You can order ActiveRecord query results by using .order:
User.order(:created_at)
#=> => [#<User id: 2, created_at: "2015-08-12 21:36:23">, #<User id: 11, created_at: "2015-08-15 10:21:48">]
If not specified, ordering will be performed in ascending order. Y...