Sha256: 00616b23f1334b05e8b90f4bd243c11259e721609c7911bb5b7107b014c447fd

Contents?: true

Size: 726 Bytes

Versions: 23

Compression:

Stored size: 726 Bytes

Contents

module Naf
  class LoggerStyleName < NafBase
    # Protect from mass-assignment issue
    attr_accessible :logger_style_id,
                    :logger_name_id,
                    :logger_level_id

    #---------------------
    # *** Associations ***
    #+++++++++++++++++++++

    belongs_to :logger_name,
      class_name: '::Naf::LoggerName'
    belongs_to :logger_style,
      class_name: '::Naf::LoggerStyle'
    belongs_to :logger_level,
      class_name: '::Naf::LoggerLevel'

    #--------------------
    # *** Validations ***
    #++++++++++++++++++++

    validates :logger_name_id,
              :logger_style_id, presence: true
    validates :logger_style_id, uniqueness: { scope: :logger_name_id }

  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
naf-2.1.13 app/models/naf/logger_style_name.rb
naf-2.1.12 app/models/naf/logger_style_name.rb
naf-2.1.11 app/models/naf/logger_style_name.rb
naf-2.1.10 app/models/naf/logger_style_name.rb
naf-2.1.9 app/models/naf/logger_style_name.rb
naf-2.1.8 app/models/naf/logger_style_name.rb
naf-2.1.6 app/models/naf/logger_style_name.rb
naf-2.1.5 app/models/naf/logger_style_name.rb
naf-2.1.4 app/models/naf/logger_style_name.rb
naf-2.1.3 app/models/naf/logger_style_name.rb
naf-2.1.2 app/models/naf/logger_style_name.rb
naf-2.1.1 app/models/naf/logger_style_name.rb
naf-2.1.0 app/models/naf/logger_style_name.rb
naf-2.0.4 app/models/naf/logger_style_name.rb
naf-2.0.3 app/models/naf/logger_style_name.rb
naf-2.0.2 app/models/naf/logger_style_name.rb
naf-2.0.1 app/models/naf/logger_style_name.rb
naf-2.0.0 app/models/naf/logger_style_name.rb
naf-1.1.4 app/models/naf/logger_style_name.rb
naf-1.1.3 app/models/naf/logger_style_name.rb