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