app/controllers/events_controller.rb in radiant-event_calendar-extension-1.4.12 vs app/controllers/events_controller.rb in radiant-event_calendar-extension-1.4.14
- old
+ new
@@ -26,11 +26,11 @@
}
format.ics {
ical = RiCal.Calendar do |cal|
events.each { |event| cal.add_subcomponent(event.to_ri_cal) }
end
- send_data ical, :filename => "#{filename}.ics"
+ send_data ical, :filename => "#{filename}.ics", :type => "text/calendar"
}
end
end
def show
@@ -40,10 +40,10 @@
timeout = (Radiant::Config['event_calendar:cache_duration'] || self.class.cache_timeout || 3600).seconds
expires_in timeout.to_i, :public => true, :private => false
}
format.ics {
ical = RiCal.Calendar { |cal| cal.add_subcomponent(@event.to_ri_cal) }
- send_data ical.to_s, :filename => "#{@event.title.slugify}.ics"
+ send_data ical.to_s, :filename => "#{@event.title.slugify}.ics", :type => "text/calendar"
}
end
end
### helper methods