Skip to content

Commit 2786581

Browse files
committed
fixed batch_action_collection not working properly when decorators are used
1 parent 04cdcb9 commit 2786581

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
module ActiveAdminScopedCollectionActions
22
module Controller
3+
COLLECTION_APPLIES = [
4+
:authorization_scope,
5+
:filtering,
6+
:scoping,
7+
:includes,
8+
].freeze
9+
310
def scoped_collection_records
411
selection = params.fetch(:collection_selection, [])
5-
selection.any? ? batch_action_collection.where(resource_class.primary_key => selection) : batch_action_collection
12+
selection.any? ? batch_action_collection(COLLECTION_APPLIES).where(resource_class.primary_key => selection)
13+
: batch_action_collection
614
end
715
end
816
end

0 commit comments

Comments
 (0)