Rails Form date_select Helper Options date range start end how many years

December 22, 2011 | By Regaz | Filed in: Uncategorized.

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

Tags: ,