use :created_at for order

This commit is contained in:
nilsding 2015-02-10 07:04:49 +01:00
parent 31d8e68725
commit e51b525fd5
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ class Notification < ActiveRecord::Base
class << self
def for(recipient, options={})
self.where(options.merge!(recipient: recipient)).order(:updated_at).reverse_order
self.where(options.merge!(recipient: recipient)).order(:created_at).reverse_order
end
def notify(recipient, target)