See this thread for a nicer way to achieve this;
http://www.ruby-forum.com/topic/57923
Basically, add the following to the bottom of your
config/environment.rb file, and use your_date_object.to_s(:geek) in
your code;
ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS.merge!(
:geek => '%Y-%m-%d'
)
Hope this helps
David