Class: Tableficate::Filter::SelectStop
- Inherits:
-
Select
- Object
- Base
- CollectionBase
- Select
- Tableficate::Filter::SelectStop
- Defined in:
- lib/tableficate/filters/select_range.rb
Instance Attribute Summary
Attributes inherited from CollectionBase
Attributes inherited from Base
#attrs, #field_name, #label, #label_options, #table, #template
Instance Method Summary collapse
- #field_value(params) ⇒ Object
-
#initialize(table, name, options = {}) ⇒ SelectStop
constructor
A new instance of SelectStop.
- #name ⇒ Object
Constructor Details
#initialize(table, name, options = {}) ⇒ SelectStop
Returns a new instance of SelectStop.
20 21 22 23 24 |
# File 'lib/tableficate/filters/select_range.rb', line 20 def initialize(table, name, = {}) super(table, name, ) @field_name += '[stop]' end |
Instance Method Details
#field_value(params) ⇒ Object
30 31 32 |
# File 'lib/tableficate/filters/select_range.rb', line 30 def field_value(params) params[:filter][@name][:stop] rescue '' end |
#name ⇒ Object
26 27 28 |
# File 'lib/tableficate/filters/select_range.rb', line 26 def name "#{@name}_stop".to_sym end |