ruby on rails - How do I view an ics file from a Calender invite mail? -
in invite.ics file, see calender object #<icalendar::calendar:0xb299a54>
tried implementing link same .ics file object. new ruby. can please refer me better tutorial on sending calendar invites google calendar, outlook, ical. here's code far.
class meetingnotification < actionmailer::base # include icalendar def meeting_request_with_calendar mail(:to => "ashi_12@gmail.com", :subject => "icalendar", :from => "tester@gmail.com") |format| format.ics { ical = icalendar::calendar.new e = icalendar::event.new e.start = datetime.now.utc e.start.icalendar_tzid="utc" # set timezone "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 eof ical.add_event(e) ical.publish ical.to_ical render :text => ical, :layout => false } end end
i may late answer..i had same issue . fixed calling to_ical
while using render method. try this
render :text => ical.to_ical
Comments
Post a Comment