Fix: 画像の並び順が変わる場合 (#339)

* Fix: 画像の並び順が変わる場合

* Fix
This commit is contained in:
KMY 2023-12-12 09:32:34 +09:00
parent 9e22306574
commit 94070aa41e

View file

@ -83,7 +83,7 @@ class Status < ApplicationRecord
has_many :mentions, dependent: :destroy, inverse_of: :status
has_many :mentioned_accounts, through: :mentions, source: :account, class_name: 'Account'
has_many :active_mentions, -> { active }, class_name: 'Mention', inverse_of: :status
has_many :media_attachments, dependent: :nullify
has_many :media_attachments, -> { order('id asc') }, dependent: :nullify, inverse_of: false
has_many :reference_objects, class_name: 'StatusReference', inverse_of: :status, dependent: :destroy
has_many :references, through: :reference_objects, class_name: 'Status', source: :target_status
has_many :referenced_by_status_objects, foreign_key: 'target_status_id', class_name: 'StatusReference', inverse_of: :target_status, dependent: :destroy