Sha256: cc8eb084e8c25920dbd5c0cb0e54363c98fe8c4273b0e0fd689773e3bf22a888

Contents?: true

Size: 334 Bytes

Versions: 10

Compression:

Stored size: 334 Bytes

Contents

module SubjModels
  module MeasureUnit

    def self.included(including_class)

      including_class.class_eval do

        include ComprisingExternalId

        belongs_to :attribute_value

        has_many :nomenclature_prices

        validates :name, presence: true

      end

    end

    def to_s
      name
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
subj_models-0.1.12 lib/subj_models/measure_unit.rb
subj_models-0.1.11 lib/subj_models/measure_unit.rb
subj_models-0.1.10 lib/subj_models/measure_unit.rb
subj_models-0.1.09 lib/subj_models/measure_unit.rb
subj_models-0.1.08 lib/subj_models/measure_unit.rb
subj_models-0.1.07 lib/subj_models/measure_unit.rb
subj_models-0.1.06 lib/subj_models/measure_unit.rb
subj_models-0.1.05 lib/subj_models/measure_unit.rb
subj_models-0.1.04 lib/subj_models/measure_unit.rb
subj_models-0.1.03 lib/subj_models/measure_unit.rb