We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04cdcb9 commit 2786581Copy full SHA for 2786581
lib/active_admin_scoped_collection_actions/controller.rb
@@ -1,8 +1,16 @@
1
module ActiveAdminScopedCollectionActions
2
module Controller
3
+ COLLECTION_APPLIES = [
4
+ :authorization_scope,
5
+ :filtering,
6
+ :scoping,
7
+ :includes,
8
+ ].freeze
9
+
10
def scoped_collection_records
11
selection = params.fetch(:collection_selection, [])
- 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
14
end
15
16
0 commit comments