Sha256: 6b3f7ac127e13ba10108514c7ca8559ab2ffb385ec53d3bf606c169a8c2b838b

Contents?: true

Size: 560 Bytes

Versions: 1

Compression:

Stored size: 560 Bytes

Contents

# Standard 是标准。
# 起草单位:   归口单位:
# 标引依据:国家标准公告2015年第38号
# 补充修订:
# 备注:
# 范围:
# Revised by: ISO/NP 9004
# Revises: ISO 9004:2000

class Unidom::Standard::Standard < ActiveRecord::Base

  self.table_name = 'unidom_standards'

  validates :name,   presence: true, length: { in: 2..self.columns_hash['name'].limit   }
  validates :number, presence: true, length: { in: 2..self.columns_hash['number'].limit }, uniqueness: true

  scope :number_is, ->(number) { where number: number }

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
unidom-standard-0.1 app/models/unidom/standard/standard.rb