Module: SubjModels::AttributeValueModule
- Defined in:
- lib/subj_models/attribute_value.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(including_class) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/subj_models/attribute_value.rb', line 7 def self.included(including_class) including_class.class_eval do include SubjModels::ComprisingExternalId has_and_belongs_to_many :nomenclature_varieties belongs_to :nomenclature belongs_to :nomenclature_attribute validates :nomenclature_value, :nomenclature_attribute, presence: true scope :nomenclature_id, -> (nomenclature_id) { parent_id_scope("nomenclature", nomenclature_id) } end end |
Instance Method Details
#to_s ⇒ Object
26 27 28 |
# File 'lib/subj_models/attribute_value.rb', line 26 def to_s nomenclature_value end |