Ruby on Rails: how do I sort with two columns using ActiveRecord?

In Rails 4 you can do something similar to:

Model.order(foo: :asc, bar: :desc)

foo and bar are columns in the db.

Leave a Comment