Module: Datagrid::Filters

Defined in:
lib/datagrid/filters.rb,
lib/datagrid/filters/composite_filters.rb

Defined Under Namespace

Modules: ClassMethods, CompositeFilters, InstanceMethods, RangedFilter, SelectOptions Classes: BaseFilter, BooleanEnumFilter, BooleanFilter, DateFilter, DateTimeFilter, DefaultFilter, DefaultFilterScope, DynamicFilter, EnumFilter, ExtendedBooleanFilter, FloatFilter, IntegerFilter, StringFilter

Constant Summary collapse

FILTER_TYPES =
{
  :date => Filters::DateFilter,
  :datetime => Filters::DateTimeFilter,
  :string => Filters::StringFilter,
  :default => Filters::DefaultFilter,
  :eboolean => Filters::BooleanEnumFilter ,
  :xboolean => Filters::ExtendedBooleanFilter ,
  :boolean => Filters::BooleanFilter ,
  :integer => Filters::IntegerFilter,
  :enum => Filters::EnumFilter,
  :float => Filters::FloatFilter,
  :dynamic => Filters::DynamicFilter
}

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

:nodoc:


37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/datagrid/filters.rb', line 37

def self.included(base) #:nodoc:
  base.extend         ClassMethods
  base.class_eval do

    include Datagrid::Core
    include Datagrid::Filters::CompositeFilters
    class_attribute :filters_array
    self.filters_array = []

  end
  base.send :include, InstanceMethods
end