Sha256: 63e8c2a162ce464ae407789a5fac4406a8a23e0cecc0dc167db654f341ff1107

Contents?: true

Size: 337 Bytes

Versions: 3

Compression:

Stored size: 337 Bytes

Contents

module Ddr
  module Alerts
    class MessageContext < ActiveRecord::Base

      CONTEXT_REPOSITORY = 'repository'.freeze
      CONTEXT_DDR = 'ddr'.freeze
      CONTEXTS = [ CONTEXT_REPOSITORY, CONTEXT_DDR ].freeze

      validates :context, inclusion: { in: CONTEXTS }

      belongs_to :message, inverse_of: :contexts

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ddr-alerts-0.2.0 lib/ddr/alerts/message_context.rb
ddr-alerts-0.1.1 lib/ddr/alerts/message_context.rb
ddr-alerts-0.1.0 lib/ddr/alerts/message_context.rb