Module: Effective::EffectiveDatatable::Dsl::BulkActions

Included in:
DatatableDslTool
Defined in:
app/models/effective/effective_datatable/dsl/bulk_actions.rb

Instance Method Summary collapse

Instance Method Details

#bulk_action(title, url, opts = {}) ⇒ Object



6
7
8
# File 'app/models/effective/effective_datatable/dsl/bulk_actions.rb', line 6

def bulk_action(title, url, opts = {})
  datatable._bulk_actions.push(link_to_bulk_action(title, url, opts))
end

#bulk_action_content(&block) ⇒ Object



18
19
20
# File 'app/models/effective/effective_datatable/dsl/bulk_actions.rb', line 18

def bulk_action_content(&block)
  datatable._bulk_actions.push(block.call)
end

#bulk_action_dividerObject



14
15
16
# File 'app/models/effective/effective_datatable/dsl/bulk_actions.rb', line 14

def bulk_action_divider
  datatable._bulk_actions.push((:div, '', class: 'dropdown-divider'))
end

#bulk_download(title, url, opts = {}) ⇒ Object



10
11
12
# File 'app/models/effective/effective_datatable/dsl/bulk_actions.rb', line 10

def bulk_download(title, url, opts = {})
  datatable._bulk_actions.push(link_to_bulk_action(title, url, opts.merge('data-bulk-download': true)))
end