use :created_at for order
This commit is contained in:
parent
31d8e68725
commit
e51b525fd5
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue