How do I view an ics file from a Calender invite mail?
actionmailer, icalendar, ruby, ruby-on-rails, rubygems
Solution
I may be too late to answer..I had the same issue . I fixed it by calling `to_ical` while using render method. Try this
render :text => ical.to_ical
Problem
In my invite.ics file, All i see is the calender object `#<Icalendar::Calendar:0xb299a54>` I tried implementing this link also but i get the same .ics file with the object. I am new to ruby. Can anyone please refer me a better tutorial on sending calendar invites for google calendar, outlook, ical. Here's the code so far. ``` class MeetingNotification < ActionMailer::Base # include Icalendar def meeting_request_with_calendar mail(:to => "ashi_12@gmail.com", :subject => "iCalendar", :from => "tester@gmail.com") do |format| format.ics { ical = Icalendar::Calendar.new e = Icalendar::Event.new e.start = DateTime.now.utc e.start.icalendar_tzid="UTC" # set timezone as "UTC" e.end = (DateTime.now + 1.day).utc e.end.icalendar_tzid="UTC" e.organizer "tester@gmail.com" e.uid "MeetingRequest" e.summary "Scrum Meeting" e.description <<-EOF Venue: Office Date: 16 August 2013 Time: 10 am EOF ical.add_event(e) ical.publish ical.to_ical render :text => ical, :layout => false } end end ```