Active record - sorting (ordering) of results

I have a model User. User has_one Profile. Profile has a field

I want to get users from User table, ordered by his first_name (which
is a field in Profile table). Is it possible? how do i do it?


@users = User.find(:all, :include => [:profile], :order =>

should work

thanks. it worked.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs