Browse Source

Fix scope latest of ReportNote (#9630)

pull/4/head
ysksn 5 years ago
committed by Eugen Rochko
parent
commit
a8ba291beb
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/models/report_note.rb

+ 1
- 1
app/models/report_note.rb 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

Loading…
Cancel
Save