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

13 lines
302 B
Ruby

# frozen_string_literal: true
# iCalendar (RFC 5545) event, belonging to an ICalendar object (its source)
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