Sha256: a4eb5062eccb4aa1a483347b0fdc7aa927d708391807a829a19be9c65419321b

Contents?: true

Size: 571 Bytes

Versions: 9

Compression:

Stored size: 571 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
        title = @view.render partial: '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.10.pre app/concerns/rao/component/collection_table/batch_actions_concern.rb
rao-component-0.0.9.pre app/concerns/rao/component/collection_table/batch_actions_concern.rb
rao-component-0.0.8.pre app/concerns/rao/component/collection_table/batch_actions_concern.rb
rao-component-0.0.7.pre app/concerns/rao/component/collection_table/batch_actions_concern.rb
rao-component-0.0.6.pre app/concerns/rao/component/collection_table/batch_actions_concern.rb
rao-component-0.0.5.pre app/concerns/rao/component/collection_table/batch_actions_concern.rb
rao-component-0.0.4.pre app/concerns/rao/component/collection_table/batch_actions_concern.rb
rao-component-0.0.3.pre app/concerns/rao/component/collection_table/batch_actions_concern.rb
rao-component-0.0.2.pre app/concerns/rao/component/collection_table/batch_actions_concern.rb