Sha256: e7e738db05ed76ed441fbef4edbba6c8148f890482064959710aecfe25f7e777

Contents?: true

Size: 408 Bytes

Versions: 51

Compression:

Stored size: 408 Bytes

Contents

require 'subj_models/concerns/comprising_external_id'

module SubjModels

  module MeasureUnitModule

    def self.included(including_class)

      including_class.class_eval do

        include SubjModels::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

51 entries across 51 versions & 2 rubygems

Version Path
subj_models-0.5.9 lib/subj_models/measure_unit.rb
subj_models-0.5.8 lib/subj_models/measure_unit.rb
subj_models-0.5.7 lib/subj_models/measure_unit.rb
subj_models-0.5.6 lib/subj_models/measure_unit.rb
subj_models-0.5.5 lib/subj_models/measure_unit.rb
subj_models-0.5.4 lib/subj_models/measure_unit.rb
subj_models-0.5.3 lib/subj_models/measure_unit.rb
subj_models-0.5.2 lib/subj_models/measure_unit.rb
subj_models-0.5.1 lib/subj_models/measure_unit.rb
subj_models-0.4.3 lib/subj_models/measure_unit.rb
subj_models-0.4.2 lib/subj_models/measure_unit.rb