Class: MightyGrid::Filters::EnumFilter

Inherits:
Base
  • Object
show all
Defined in:
lib/mighty_grid/filters/enum_filter.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#attribute, #default, #model, #options, #search_value

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ EnumFilter

Returns a new instance of EnumFilter.



6
7
8
9
10
11
12
# File 'lib/mighty_grid/filters/enum_filter.rb', line 6

def initialize(options = {})
  self.class.default_options.merge!(collection: nil)

  super(options)

  @collection = @options[:collection]
end

Instance Attribute Details

#collectionObject (readonly)

Returns the value of attribute collection.



4
5
6
# File 'lib/mighty_grid/filters/enum_filter.rb', line 4

def collection
  @collection
end