search for: find_all_with_appoint

Displaying 1 result from an estimated 1 matches for "find_all_with_appoint".

2006 Jan 10
0
Day.find_all_with_appointments - INNER JOIN
Hi list, Is there a better/simpler way to code an inner join, than the 4 lines below: class Day < Foo def self.find_all_with_appointments (*args) find :all, { :select => ''distinct foos.*'', :joins => ''INNER JOIN appointments ON days.appointment_id = foos.id'' }.merge (extract_options_from_args!(args)) end has_many...