Better rails way to join tables?

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

Why can you not use :include ?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs