search for: country_of_origin

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

2006 Sep 21
3
:order by association field
Hi. I''m trying to do something that should be a fairly common pattern, but I''m currently not sure how. BACKGROUND: model Family has_one Father. also, Family has field "country_of_origin" model Father has a number of fields, such as first_name, age, etc. It''s easy to sort based on families'' fields: sorted_families = Family.find(:all, :order => ''country_of_origin'') But, how do I sort based on the fields of the child? For example, how do...