Sha256: dcb04355861287ffeece019200e02a6bb92d942c67caad7d171c9603841075fe
Contents?: true
Size: 552 Bytes
Versions: 2
Compression:
Stored size: 552 Bytes
Contents
require 'subj_models/concerns/comprising_external_id' module SubjModels module Action def self.included(including_class) including_class.class_eval do include SubjModels::ComprisingExternalId has_and_belongs_to_many :cities has_and_belongs_to_many :nomenclatures belongs_to :image, class_name: "DocumentFile" validates :name, :discount_percent, presence: true scope :to_show, -> condition { where(to_show: condition) } end end def to_s name end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
subj_models-0.4.1 | lib/subj_models/action.rb |
subj_models-0.4 | lib/subj_models/action.rb |