Class: ApplicationEvent
- Inherits:
-
RailsEventStore::Event
- Object
- RailsEventStore::Event
- ApplicationEvent
- Defined in:
- app/events/application_event.rb
Overview
Base class for all domain events in this application.
JSON serialization (used by RailsEventStore::JSONClient) converts symbol keys
to strings on round-trip: { party_id: 1 } → stored as "party_id":1 → loaded
as { "party_id" => 1 }. Handlers throughout the app access data with symbol
keys (event.data[:party_id]), so we wrap the deserialized hash in
HashWithIndifferentAccess so both forms always work.
See: https://railseventstore.org/docs/advanced-topics/event-serialization-formats
Direct Known Subclasses
Events::ActivityCreated, Events::ActivityUpdated, Events::ArticlePublished, Events::ArticleUnpublished, Events::AssistantMessageCompleted, Events::BuyingGroupChanged, Events::ContactPointAdded, Events::ContactPointPhoneChanged, Events::ContentEmbeddingRequired, Events::CustomerSourceChanged, Events::DeliveryInvoiced, Events::DeliveryShipped, Events::DiscountLevelChanged, Events::EmailUnsubscribed, Events::EmployeeSignedIn, Events::InvoiceCreated, Events::LocationChanged, Events::OpportunityFollowedUp, Events::OrderAcknowledged, Events::OrderBackOrdered, Events::OrderCancelled, Events::OrderInvoiced, Events::PostContentUpdated, Events::PriceUpdated, Events::ProductInterestChanged, Events::PublicationPdfChanged, Events::QuoteCompleted, Events::RmaReceived, Events::ShipmentFirstCarrierScan, Events::ShowcaseUnpublished, Events::SitemapRegenerated, Events::SupportCaseClosed
Instance Method Summary collapse
Instance Method Details
#data ⇒ Object
13 14 15 |
# File 'app/events/application_event.rb', line 13 def data ActiveSupport::HashWithIndifferentAccess.new(super) end |