Files
growstuff/config/initializers/time_formats.rb
Skud 2ecbd8315d bugfix: don't say 'not yet set' in planting form
PT: https://www.pivotaltracker.com/story/show/51457917

Maco found this. The problem was that if you had a blank planting date,
and then re-edited the planting, it would say "not yet set" in the form
field, then die when it later tried to convert that to a date.

I replaced Miles's planted_at_string stuff in the model with a simpler
parse_date method in the application helper.
2013-06-11 16:08:02 +10:00

10 lines
269 B
Ruby

Time::DATE_FORMATS[:default] = '%B %d, %Y at %H:%M'
Date::DATE_FORMATS[:default] = "%B %d, %Y"
Time::DATE_FORMATS[:date] = "%B %d, %Y"
Date::DATE_FORMATS[:date] = "%B %d, %Y"
Date::DATE_FORMATS[:ymd] = "%Y-%m-%d"
Time::DATE_FORMATS[:datetime] = '%B %d, %Y at %H:%M'