Sha256: ca070337b68ff4e502ba99a4d107f1d140a3ed62e2f7f04e3177b22649eb1b66
Contents?: true
Size: 1.13 KB
Versions: 66
Compression:
Stored size: 1.13 KB
Contents
# frozen_string_literal: true module Effective module EffectiveDatatable module Dsl def bulk_actions(&block) define_method('initialize_bulk_actions') { dsl_tool.instance_exec(&block); dsl_tool.bulk_actions_col } end def charts(&block) define_method('initialize_charts') { dsl_tool.instance_exec(&block) } end 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 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 self.source_location = block.source_location.first if block.respond_to?(:source_location) end end def filters(&block) define_method('initialize_filters') { dsl_tool.instance_exec(&block) } end end end end
Version data entries
66 entries across 66 versions & 1 rubygems