2
0

Add Account.auditable scope, fix N+1 in admin/action_logs#index (#28812)

This commit is contained in:
Matt Jankowski
2024-01-18 20:39:30 -05:00
committed by GitHub
parent 5ae3bae586
commit 1480573c83
4 changed files with 22 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ module Admin
def index
authorize :audit_log, :index?
@auditable_accounts = Account.where(id: Admin::ActionLog.select('distinct account_id')).select(:id, :username)
@auditable_accounts = Account.auditable.select(:id, :username)
end
private