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