I found some old messages about this, but can't find a solution.

The default rails date format for postgres is yyyy-mm-dd. While I have
no problem with this, users who were trained after the millennium non-
event are pretty entrenched in mm/dd/yyyy.

You can set the default date format in environment.rb to

Date::DATE_FORMATS[:default] = "%m/%d/%Y"

At least in rails3 and it nicely formats the dates in that format. But
if you enter a date in that format, it will set it to nil.

If you have validation on the date, it will fail.

I think postgres can be set to different options but don't know how to
do that globally.

Is there any solution to setting rails to get and put dates using mm/
dd/yyyy?

Steve

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to