diff --git a/config/initializers/app_globals.rb b/config/initializers/app_globals.rb index da94a378..11a12f9f 100644 --- a/config/initializers/app_globals.rb +++ b/config/initializers/app_globals.rb @@ -15,6 +15,6 @@ GeoRuby::SimpleFeatures::DEFAULT_SRID = 4326 -Time::DATE_FORMATS.merge :ical => "%Y%m%d" # yyyymmdd, for iCal conversion +Date::DATE_FORMATS[:ical] = "%Y%m%d" # yyyymmdd, for iCal conversion FONT_ROOT = "#{RAILS_ROOT}/fonts/dejavu-fonts-ttf-2.26/ttf" diff --git a/spec/views/events/ical.ics.erb_spec.rb b/spec/views/events/ical.ics.erb_spec.rb index b76e3476..4dafe726 100644 --- a/spec/views/events/ical.ics.erb_spec.rb +++ b/spec/views/events/ical.ics.erb_spec.rb @@ -32,6 +32,6 @@ end it "should contain the date in iCal format" do - rendered.should have_content("DTSTART;VALUE=DATE:#{@event.date.to_s :ical}") + rendered.should have_content("DTSTART;VALUE=DATE:#{@event.date.strftime '%Y%m%d'}") end end