Class: Conjoin::FormBuilder::YearInput
- Inherits:
-
SelectInput
- Object
- Input
- SelectInput
- Conjoin::FormBuilder::YearInput
- Defined in:
- lib/conjoin/inputs/year.rb
Instance Attribute Summary
Attributes inherited from Input
#app, #data, #options, #record
Instance Method Summary collapse
Methods inherited from SelectInput
Methods inherited from Input
#display, #errors?, #id, #initialize, #nested_name, #render
Constructor Details
This class inherits a constructor from Conjoin::FormBuilder::Input
Instance Method Details
#select_options ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/conjoin/inputs/year.rb', line 6 def years_select = {} years = (1900..(Date.today.year+2)).to_a.reverse! years.each do |year| years_select[year] = year.to_s end years_select end |