red_car_owners = Owner.find(
:include => :cars,
:conditions => [“cars.colour = ?”, ‘RED’]
where “cars.colour” is referring to the cars table directly.
Try tailing the development log to get a peek at the left outer join
put together by the :include eager loading and you’ll see that the cars
is included in the Owner.find query. You can then add conditions which
reference the cars table. I think…
On Saturday 14 January 2006 6:12 am, keith raterink wrote:
I guess I was wondering if there was a design-pattern for things like
this that do not go all the way down to the SQL.
Easy Schedule Management