I need to create a list of users sorted by division. How do I sort User
table by Division name? I can only get it to sorted by division_id.
Part of my code is shown below:
sort = case params[‘sort’]
when “id” then “id ASC”
when “email” then “email ASC”
when “division_id” then “division_id ASC”
@users = User.find(:all, :order => sort)