Fix sort order of moderation notes on Reports and Accounts (#31528)
This commit is contained in:
parent
a9d0b48b65
commit
c88ba523ee
12 changed files with 105 additions and 8 deletions
|
@ -18,7 +18,7 @@ class ReportNote < ApplicationRecord
|
|||
belongs_to :account
|
||||
belongs_to :report, inverse_of: :notes, touch: true
|
||||
|
||||
scope :latest, -> { reorder(created_at: :desc) }
|
||||
scope :chronological, -> { reorder(id: :asc) }
|
||||
|
||||
validates :content, presence: true, length: { maximum: CONTENT_SIZE_LIMIT }
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue