Module: Effective::EffectiveDatatable::Dsl
- Included in:
- Datatable
- Defined in:
- app/models/effective/effective_datatable/dsl.rb,
app/models/effective/effective_datatable/dsl/charts.rb,
app/models/effective/effective_datatable/dsl/filters.rb,
app/models/effective/effective_datatable/dsl/datatable.rb,
app/models/effective/effective_datatable/dsl/bulk_actions.rb
Defined Under Namespace
Modules: BulkActions, Charts, Datatable, Filters
Instance Method Summary
collapse
Instance Method Details
#bulk_actions(&block) ⇒ Object
5
6
7
|
# File 'app/models/effective/effective_datatable/dsl.rb', line 5
def bulk_actions(&block)
define_method('initialize_bulk_actions') { dsl_tool.instance_exec(&block); dsl_tool.bulk_actions_col }
end
|
#charts(&block) ⇒ Object
9
10
11
|
# File 'app/models/effective/effective_datatable/dsl.rb', line 9
def charts(&block)
define_method('initialize_charts') { dsl_tool.instance_exec(&block) }
end
|
#collection(apply_belongs_to: true, apply_scope: true, &block) ⇒ Object
13
14
15
16
17
18
19
20
|
# File 'app/models/effective/effective_datatable/dsl.rb', line 13
def collection(apply_belongs_to: true, apply_scope: true, &block)
define_method('initialize_collection') {
self._collection_apply_belongs_to = apply_belongs_to
self._collection_apply_scope = apply_scope
self._collection = dsl_tool.instance_exec(&block)
}
end
|
#datatable(&block) ⇒ Object
22
23
24
25
26
27
28
|
# File 'app/models/effective/effective_datatable/dsl.rb', line 22
def datatable(&block)
define_method('initialize_datatable') do
dsl_tool.in_datatables_do_block = true
dsl_tool.instance_exec(&block)
dsl_tool.in_datatables_do_block = false
end
end
|
#filters(&block) ⇒ Object
30
31
32
|
# File 'app/models/effective/effective_datatable/dsl.rb', line 30
def filters(&block)
define_method('initialize_filters') { dsl_tool.instance_exec(&block) }
end
|