You can tell SQL to order a SELECT query for you. This is more efficient than sorting it yourself (with `array.sort`). Look it up here: http://guides.rubyonrails.org/active_record_querying.html#ordering