1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/app/models/i_calendar.rb
2020-03-25 12:35:09 +01:00

16 lines
337 B
Ruby

# frozen_string_literal: true
# iCalendar (RFC 5545) files, stored by URL and kept with their display configuration
class ICalendar < ApplicationRecord
has_many :i_calendar_events, dependent: :destroy
after_create :sync_events
private
def sync_events
worker = ICalendarImportWorker.new
worker.perform([id])
end
end