Enable caching for some rabl views
This commit is contained in:
parent
aff22bfdb5
commit
0160d1d9b5
11 changed files with 38 additions and 32 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue