Skip to content
Open
Prev Previous commit
Next Next commit
Handle ActiveRecord::Relation in policy_target method
  • Loading branch information
amkisko authored Mar 4, 2026
commit 936d40c42bc84671129b2d4065e4fe39770f659b
1 change: 1 addition & 0 deletions lib/active_admin/action_policy_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def default_scope_type
def policy_target(subject)
case subject
when nil then resource.resource_class
when ActiveRecord::Relation then subject.klass
when Class then subject.new
else
subject
Expand Down