Class: MrCommon::Reminder
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- MrCommon::Reminder
- Defined in:
- app/models/mr_common/reminder.rb
Instance Method Summary collapse
Instance Method Details
#to_ical ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'app/models/mr_common/reminder.rb', line 18 def to_ical cal = Icalendar::Calendar.new cal.add_timezone(TZInfo::Timezone.get(time_zone).ical_timezone(start_time)) cal.event do |e| e.dtstart = calendar_start_time e.dtend = calendar_end_time e.summary = summary e.location = location e.description = description end cal.publish cal.to_ical end |