Sha256: 44d789085b5a22f3ae4017991c20cad6f1ee897f9fd56d4b2c90fc28585ac869

Contents?: true

Size: 681 Bytes

Versions: 9

Compression:

Stored size: 681 Bytes

Contents

module Rao
  module Component
    module CollectionTable::BatchActionsConcern
      extend ActiveSupport::Concern

      # Example:
      #
      #     = table.batch_actions(actions: { destroy: url_for(action: :destroy_many) })
      #
      def batch_actions(options = {}, &block)
        @wrap_in_form = true
        options[:actions] ||= instance_exec(&Rao::Component::Configuration.batch_actions_default_actions)
        title = @view.render partial: 'rao/component/table/header_cells/batch_actions', locals: { options: options }
        options.reverse_merge!(render_as: :batch_actions, title: title)
        column(:batch_actions, options, &block)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rao-component-0.0.52.pre app/concerns/rao/component/collection_table/batch_actions_concern.rb
rao-component-0.0.51.pre app/concerns/rao/component/collection_table/batch_actions_concern.rb
rao-component-0.0.50.pre app/concerns/rao/component/collection_table/batch_actions_concern.rb
rao-component-0.0.49.pre app/concerns/rao/component/collection_table/batch_actions_concern.rb
rao-component-0.0.48.pre app/concerns/rao/component/collection_table/batch_actions_concern.rb
rao-component-0.0.47.pre app/concerns/rao/component/collection_table/batch_actions_concern.rb
rao-component-0.0.46.pre app/concerns/rao/component/collection_table/batch_actions_concern.rb
rao-component-0.0.45.pre app/concerns/rao/component/collection_table/batch_actions_concern.rb
rao-component-0.0.44.pre app/concerns/rao/component/collection_table/batch_actions_concern.rb