Class: Tableficate::Filter::SelectStop
- Inherits:
-
Select
show all
- Defined in:
- lib/tableficate/filters/select_range.rb
Instance Attribute Summary
#collection
Attributes inherited from Base
#attrs, #field_name, #label, #label_options, #table, #template
Instance Method Summary
collapse
Constructor Details
#initialize(table, name, options = {}) ⇒ SelectStop
20
21
22
23
24
|
# File 'lib/tableficate/filters/select_range.rb', line 20
def initialize(table, name, options = {})
super(table, name, options)
@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
|