On Sep 7, 1:52 am, Phlip <[EMAIL PROTECTED]> wrote:
>    Appointment.find( :all, :include => :tasks,
>                          :conditions => { :'tasks.project_id' => 1} )
>
> In summary, provide enough :has_many => :through to get to the keying table,
> then put it into your :include and :conditions.
>
> Warning: :include will eager-load, which might slow you down with irrelevant 
> data.
>

In a situation like this :joins might be more appropriate - it will
write the joins but won't do any of the stuff :include would

Fred
--~--~---------~--~----~------------~-------~--~----~
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