Fix scope latest of ReportNote (#9630)

lolsob-rspec
ysksn 2018-12-26 14:38:59 +09:00 committed by Eugen Rochko
parent 75e3538da4
commit 09b6bf49ee
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ class ReportNote < ApplicationRecord
belongs_to :account
belongs_to :report, inverse_of: :notes, touch: true
scope :latest, -> { reorder('created_at ASC') }
scope :latest, -> { reorder(created_at: :desc) }
validates :content, presence: true, length: { maximum: 500 }
end