Sha256: a4abf699118d7bda7596d2cb7e4ad41e3631c3785d56b6150b7c908ff637031e
Contents?: true
Size: 875 Bytes
Versions: 43
Compression:
Stored size: 875 Bytes
Contents
require 'subj_models/concerns/comprising_external_id' module SubjModels module ActionBannerModule 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 has_and_belongs_to_many :brands belongs_to :image, class_name: "DocumentFile" belongs_to :categories_list_image, class_name: "DocumentFile" validates :nomenclatures, presence: true validates :name, presence: true # validates :discount_percent, # presence: true, # numericality: {only_integer: true, greater_than_or_equal_to: 0, less_than_or_equal_to: 100} scope :to_show, -> condition { where(to_show: condition) } end end def to_s name end end end
Version data entries
43 entries across 43 versions & 2 rubygems