Sha256: 2d568bd4f3fbe2d8c301cf072478b2b0d12dfeb1d29bc823fdb33d79b178b029

Contents?: true

Size: 741 Bytes

Versions: 3

Compression:

Stored size: 741 Bytes

Contents

# Product 是产品。

class Unidom::Product::Product < ActiveRecord::Base

  self.table_name = 'unidom_products'

  include Unidom::Common::Concerns::ModelExtension
  include Unidom::Product::Concerns::AsSourceProductAssociating
  include Unidom::Product::Concerns::AsTargetProductAssociating

  validates :name,             presence: true, length: { in: 2..self.columns_hash['name'].limit             }
  validates :abbreviation,     presence: true, length: { in: 1..self.columns_hash['abbreviation'].limit     }
  validates :measurement_unit, presence: true, length: { in: 1..self.columns_hash['measurement_unit'].limit }
  validates :packing_norm,     presence: true, length: { in: 1..self.columns_hash['packing_norm'].limit     }

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
unidom-product-1.3 app/models/unidom/product/product.rb
unidom-product-1.2 app/models/unidom/product/product.rb
unidom-product-1.1 app/models/unidom/product/product.rb