On Nov 16, 2:27 pm, andyl <[email protected]> wrote:
> Something like this: Member.order("roster.name, zip_code").all
>
> But I can't get the syntax quite right - I've played around with join
> and include - can anyone tell me the right syntax to use??

Remember that table names are plural.

Member.joins(:roster).order("rosters.name, zip_code")

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to