Sha256: 762875783a36318537b3439e10d47c783597eb0d94eb6f97de73d9b7dfd6a7d6

Contents?: true

Size: 1.01 KB

Versions: 47

Compression:

Stored size: 1.01 KB

Contents

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
        end
      end

      def filters(&block)
        define_method('initialize_filters') { dsl_tool.instance_exec(&block) }
      end

    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
effective_datatables-3.7.10 app/models/effective/effective_datatable/dsl.rb
effective_datatables-3.7.9 app/models/effective/effective_datatable/dsl.rb
effective_datatables-3.7.8 app/models/effective/effective_datatable/dsl.rb
effective_datatables-4.9.2 app/models/effective/effective_datatable/dsl.rb
effective_datatables-4.9.1 app/models/effective/effective_datatable/dsl.rb
effective_datatables-4.9.0 app/models/effective/effective_datatable/dsl.rb
effective_datatables-4.8.16 app/models/effective/effective_datatable/dsl.rb
effective_datatables-4.8.15 app/models/effective/effective_datatable/dsl.rb
effective_datatables-4.8.14 app/models/effective/effective_datatable/dsl.rb
effective_datatables-4.8.13 app/models/effective/effective_datatable/dsl.rb
effective_datatables-4.8.12 app/models/effective/effective_datatable/dsl.rb
effective_datatables-3.7.7 app/models/effective/effective_datatable/dsl.rb
effective_datatables-4.8.11 app/models/effective/effective_datatable/dsl.rb
effective_datatables-4.8.10 app/models/effective/effective_datatable/dsl.rb
effective_datatables-4.8.9 app/models/effective/effective_datatable/dsl.rb
effective_datatables-4.8.8 app/models/effective/effective_datatable/dsl.rb
effective_datatables-4.8.7 app/models/effective/effective_datatable/dsl.rb
effective_datatables-4.8.6 app/models/effective/effective_datatable/dsl.rb
effective_datatables-4.8.5 app/models/effective/effective_datatable/dsl.rb
effective_datatables-4.8.4 app/models/effective/effective_datatable/dsl.rb