Sha256: 55763cc0c3173e290b4347a073ce7421fed96311d8f47147b86d12509582f423

Contents?: true

Size: 489 Bytes

Versions: 3

Compression:

Stored size: 489 Bytes

Contents

require "active_record"

module Outboxer
  module Models
    class Message < ::ActiveRecord::Base
      self.table_name = :outboxer_messages

      STATUS = {
        unpublished: "unpublished",
        publishing: "publishing",
        failed: "failed"
      }.freeze

      belongs_to :message, polymorphic: true

      has_many :exceptions, -> { order(created_at: :asc) },
               class_name: "::Outboxer::Models::Exception",
               dependent: :destroy
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
outboxer-0.1.3 lib/outboxer/models/message.rb
outboxer-0.1.2 lib/outboxer/models/message.rb
outboxer-0.1.1 lib/outboxer/models/message.rb