Sha256: d5514bafc977d43b91576c2c5b11da2bdaec70a2f39a8a1770afadc9e9258423
Contents?: true
Size: 650 Bytes
Versions: 13
Compression:
Stored size: 650 Bytes
Contents
class CirculationStatus < ActiveRecord::Base include MasterModel validates :name, presence: true, format: { with: /\A[0-9A-Za-z][0-9A-Za-z_\-\s,]*[0-9a-z]\Z/ } default_scope { order('circulation_statuses.position') } scope :available_for_checkout, -> { where(name: 'Available On Shelf') } has_many :items private def valid_name? true end end # == Schema Information # # Table name: circulation_statuses # # id :integer not null, primary key # name :string(255) not null # display_name :text # note :text # position :integer # created_at :datetime # updated_at :datetime #
Version data entries
13 entries across 13 versions & 1 rubygems