Fix N+1s because of association preloaders not actually getting called (#28339)
This commit is contained in:
parent
3f1ec16377
commit
dcc24db793
7 changed files with 12 additions and 12 deletions
|
@ -37,13 +37,13 @@ class InlineRenderer
|
|||
private
|
||||
|
||||
def preload_associations_for_status
|
||||
ActiveRecord::Associations::Preloader.new(records: @object, associations: {
|
||||
ActiveRecord::Associations::Preloader.new(records: [@object], associations: {
|
||||
active_mentions: :account,
|
||||
|
||||
reblog: {
|
||||
active_mentions: :account,
|
||||
},
|
||||
})
|
||||
}).call
|
||||
end
|
||||
|
||||
def current_user
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue