- How can I create in rails a drop down with all months in it?
- How do I create a drop down with a list of years beginning from current year and 8 years forward (2012, 2013… 2020)?
Thanks.
How can I create in rails a drop down with all months in it?
Share
For the months:
(the
Date.todayargument will default it to the current month – useselect_month(1)to default to January)For the years: