Class: Tableficate::Filter::InputStart
- 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 = {}) ⇒ InputStart
constructor
A new instance of InputStart.
- #name ⇒ Object
Constructor Details
#initialize(table, name, options = {}) ⇒ InputStart
Returns a new instance of InputStart.
4 5 6 7 8 |
# File 'lib/tableficate/filters/input_range.rb', line 4 def initialize(table, name, = {}) super(table, name, ) @field_name += '[start]' end |
Instance Method Details
#field_value(params) ⇒ Object
14 15 16 |
# File 'lib/tableficate/filters/input_range.rb', line 14 def field_value(params) params[:filter][@name][:start] rescue '' end |
#name ⇒ Object
10 11 12 |
# File 'lib/tableficate/filters/input_range.rb', line 10 def name "#{@name}_start".to_sym end |