Sha256: 6e1a00ec4220825961365f8197134aad744d1419e6ce7c93e4f031769fd86cdc
Contents?: true
Size: 605 Bytes
Versions: 11
Compression:
Stored size: 605 Bytes
Contents
module Marty module Notifications class Notification < Marty::Base self.table_name = 'marty_notifications' validates :state, :event_type, presence: true has_many( :deliveries, class_name: '::Marty::Notifications::Delivery', dependent: :destroy, foreign_key: :notification_id, inverse_of: :notification ) state_machine :state, initial: :pending do state :pending state :processed event :set_processed do transition processed: same, pending: :processed end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems