Module: Tito::Eventable
- Included in:
- DiscountCode, EventSettings, InterestedUser, Question, Registration, Release, Ticket, WebhookEndpoint, WebhookEndpointIncludedTrigger
- Defined in:
- lib/tito/eventable.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/tito/eventable.rb', line 4 def self.included(base) base.extend ClassMethods base.class_eval do property :event property :event_id end end |
Instance Method Details
#event=(tito_event) ⇒ Object
12 13 14 15 16 |
# File 'lib/tito/eventable.rb', line 12 def event=(tito_event) self.event_id = tito_event.id self.attributes[:event] = tito_event @event = tito_event end |