diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/favourite.rb | 2 | ||||
-rw-r--r-- | app/models/status.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/favourite.rb b/app/models/favourite.rb index 4f9b20942..8b8082f1e 100644 --- a/app/models/favourite.rb +++ b/app/models/favourite.rb @@ -2,7 +2,7 @@ class Favourite < ApplicationRecord include Streamable belongs_to :account, inverse_of: :favourites - belongs_to :status, inverse_of: :favourites + belongs_to :status, inverse_of: :favourites, touch: true validates :status_id, uniqueness: { scope: :account_id } diff --git a/app/models/status.rb b/app/models/status.rb index 19c0488d0..1cd56c97b 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -5,7 +5,7 @@ class Status < ApplicationRecord belongs_to :account, -> { with_counters }, inverse_of: :statuses belongs_to :thread, foreign_key: 'in_reply_to_id', class_name: 'Status', inverse_of: :replies - belongs_to :reblog, foreign_key: 'reblog_of_id', class_name: 'Status', inverse_of: :reblogs + belongs_to :reblog, foreign_key: 'reblog_of_id', class_name: 'Status', inverse_of: :reblogs, touch: true has_many :favourites, inverse_of: :status, dependent: :destroy has_many :reblogs, foreign_key: 'reblog_of_id', class_name: 'Status', inverse_of: :reblog, dependent: :destroy |