Eager loading fixes for api/
controllers (#28848)
This commit is contained in:
parent
ceade78182
commit
c0e8e457ab
13 changed files with 14 additions and 14 deletions
|
@ -17,7 +17,7 @@ class Api::V1::BlocksController < Api::BaseController
|
|||
end
|
||||
|
||||
def paginated_blocks
|
||||
@paginated_blocks ||= Block.eager_load(target_account: :account_stat)
|
||||
@paginated_blocks ||= Block.eager_load(target_account: [:account_stat, :user])
|
||||
.joins(:target_account)
|
||||
.merge(Account.without_suspended)
|
||||
.where(account: current_account)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue