search for: phrase_id

Displaying 5 results from an estimated 5 matches for "phrase_id".

2006 Apr 29
2
Seeing performance problems with has_many :through relation
...2 fields, id and url Table 2: phrases ( there are about 87,000 records ) 2 fields, id and phrase (w/ an index defined on phrase) A given url can be associated w/ many phrases and a given phrase can be associated with many urls. Table 3: relations ( there are about 235,000 records ) id, url_id, phrase_id and isrel (int) w/ an index created on url_id,phrase_id In Relation model I have belongs_to :url belongs_to :phrase In Url model I have has_many :relations has_many :phrases, :through => :relations In Phrase model I have has_many :relations has_many :urls, :through => :re...
2006 Apr 28
9
Q: Timing of render :update in an action ?
Hey folks, am hoping someone can set me straight with a solution to an issue that has come up involving the timing of rendered page elements in relation to the completion of an action''s execution. I have an ror search app which searches through two tables consisting of 7,000 page urls and a table w/ 87,000 related keyphrases within those pages. Search results can take anywhere from 2
2011 Jul 11
36
has_many and belongs_to association
...;name" error is 1) Failure: test: check has_many and belongs_to association should have many languages. (PhraseTest) [/usr/local/lib/ruby/gems/1.9.1/gems/ shoulda-2.11.3/lib/shoulda/context.rb:324]: Expected Phrase to have a has_many association called languages (Language does not have a phrase_id foreign key.). Expected block to return true value. I dont really understand what it''s warning now.. Yennie -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA...
2006 Apr 24
9
Confusion with expressing many to many relationship
Hi folks, I am in the process of converting an existing non-rails application to rails, and am not sure what the best approach would be for specifying the relationship between the two sets of data. I''ll describe the existing table structures first. Table 1: Urls Each url has a unique id and two lists of Phrases, these are currently setup as varchars with "," delimitation -
2008 Oct 28
3
Backwards N+1 problem
Hey, i’m running into an N+1 problem, but i don''t exactly know how to :include in this situation. (controller code is at the bottom). I''m trying to find all of the highest ranked definitions, and then render their associated phrases. A Phrase has many definitions. A Definition has many children I already have all the info i need stored in @definitions, so this should only