Class: MightyGrid::Filters::EnumFilter
- Defined in:
- lib/mighty_grid/filters/enum_filter.rb
Instance Attribute Summary collapse
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
Attributes inherited from Base
#attribute, #default, #model, #options, #search_value
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ EnumFilter
constructor
A new instance of EnumFilter.
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( = {}) self.class..merge!(collection: nil) super() @collection = @options[:collection] end |
Instance Attribute Details
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
4 5 6 |
# File 'lib/mighty_grid/filters/enum_filter.rb', line 4 def collection @collection end |