Sha256: 8dcd0bc4c6de2cce2c20156701a6eae77d9e151b97e60eb15e55133b650985bf
Contents?: true
Size: 472 Bytes
Versions: 6
Compression:
Stored size: 472 Bytes
Contents
module Outboxer module Outboxable def self.included(base) base.extend ClassMethods base.class_eval do has_one :message, class_name: "::Outboxer::Message", as: :outbox_message, dependent: :destroy after_create :create_outbox_message! end end def create_outbox_message! Message.create!(message: self, status: Message::STATUS[:unpublished]) end module ClassMethods end end end
Version data entries
6 entries across 6 versions & 1 rubygems