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" end end end