about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorysksn <bluewhale1982@gmail.com>2018-12-26 14:38:59 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-12-26 06:38:59 +0100
commita8ba291beb7336364ed93da0c161b42c1ed9506d (patch)
tree4375bb217dfa53194c89375dd8d0c39ab91f2f05 /app/models
parent0c1e4bb969a117c186e08396f9db0f747f04bdbd (diff)
Fix scope latest of ReportNote (#9630)
Diffstat (limited to 'app/models')
-rw-r--r--app/models/report_note.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/report_note.rb b/app/models/report_note.rb
index 54b416577..6d7167e0e 100644
--- a/app/models/report_note.rb
+++ b/app/models/report_note.rb
@@ -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