Rails, date_select and “index out of string”

   By chris on August 11th 2009 in /dev/rails | 1,279 views

If you’re working in Rails and using date_select() or datetime_select() (and presumably select_date() and select_datetime()) and you find yourself up against an error like the following:

index 3873 out of string

Check that your :default parameter is either nil or an actual Date/Time/DateTime instance and not a String. Passing in a string as :default really messes things up.

Comments are closed.

Trackback URI |