Sha256: 29c97e9e8640db0118a510bfaf07de397b02ef5814bfd5bea56ce79e882ea91e

Contents?: true

Size: 292 Bytes

Versions: 4

Compression:

Stored size: 292 Bytes

Contents

module ActiveAdminScopedCollectionActions
  module Controller
    def scoped_collection_records
      selection = params.fetch(:collection_selection, [])
      selection.any? ? batch_action_collection.where(resource_class.primary_key => selection) : batch_action_collection
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
active_admin_scoped_collection_actions-0.3.4 lib/active_admin_scoped_collection_actions/controller.rb
active_admin_scoped_collection_actions-0.3.3 lib/active_admin_scoped_collection_actions/controller.rb
active_admin_scoped_collection_actions-0.3.0 lib/active_admin_scoped_collection_actions/controller.rb
active_admin_scoped_collection_actions-0.2.1 lib/active_admin_scoped_collection_actions/controller.rb