Displaying 1 result from an estimated 1 matches for "event_images".
2007 Apr 09
1
help with ActiveRecord joins
I''m working on a fairly complex join query and could use a bit of advice
from more expert users of ActiveRecord.
I have an events table with quite a lot of data, with has_many relations
to categories, age_groups, and event_images. In my first naive
implementation, each event had a date, so to load all upcoming events
efficiently, I''d do:
Event.find(:all, :conditions=>[''start_date >= ?'', Date.today],
:includes=[:categories, :age_groups, :event_images])
This works well, and returns all data...