Rails Form Date_select Helper Options Date Range Start End How Many Years

December 22, 2011 | By Duchateaux.

To Change the Default Settings for the date_select Helper in a Rails form.

cd path/To/railsApp
cd app/views/yourApp
nano _form.html.erb

Edit the line containing date_select and insert some options.

Here is a list: date_select Options.

For example if you want to Change the Select Date Range to be 1990-1910:

f.date_select(:date,:start_year => 1990,:end_year => 1910)
To Get some Extra-Insight Look this other Guide:
Howto Deploy Rails with Git Capistrano Mongrel

QuickChic Theme • Powered by WordPress