Why can you not use :include ?
On 9/23/06, David Lelong
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:>
> Hi,
>
> I''ve figured out how to join tables using :joins, but is there a
more
> elegant way to do this using built-in rails methods?
>
> Here is the code:
>
> Hiringstep_Job.find(
> :all,
> :joins => ", hiringsteps",
> :conditions => ["hiringstep_jobs.hiringstep_id = hiringsteps.id AND
> job_id = ?", 1])
>
> Thanks,
>
> David
>
> --
> 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---