1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/app/models/i_calendar.rb

16 lines
337 B
Ruby
Raw Normal View History

2019-11-27 17:05:19 +01:00
# frozen_string_literal: true
# iCalendar (RFC 5545) files, stored by URL and kept with their display configuration
2020-03-25 10:16:47 +01:00
class ICalendar < ApplicationRecord
2019-12-03 10:17:29 +01:00
has_many :i_calendar_events, dependent: :destroy
after_create :sync_events
private
def sync_events
worker = ICalendarImportWorker.new
worker.perform([id])
end
2019-11-27 17:05:19 +01:00
end