I have a phrase model, a definition model, and a children model
a phrase has many definitions, a definition has many children

currently when i am doing a find i have an include that looks like

Phrase.find(:all,:include => [{:definitions => :children}] , :conditions
=> 'foo')

but for the most part I only want the first definition, and its
associated children. The loading of all of the additional definitions
and their associated children is killing my site load time (but not more
than eliminating the :include all together).

Is there a way to get only the first definition under an associated
phrase ( the definitions are ordered by rank) without having to write my
own SQL ??

Rails 2.1.0 and Ruby 1.8.6
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to