1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-28 09:24:24 +01:00
fab-manager/app/models/i_calendar_event.rb

13 lines
302 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# iCalendar (RFC 5545) event, belonging to an ICalendar object (its source)
2020-03-25 10:16:47 +01:00
class ICalendarEvent < ApplicationRecord
belongs_to :i_calendar
def self.update_or_create_by(args, attributes)
obj = find_or_create_by(args)
obj.update(attributes)
obj
end
end