mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 08:48:53 +00:00
Fix N+1s because of association preloaders not actually getting called (#28339)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user