Sha256: c75ec45e53ef0f213361b27c489b2b9ded92b93b16e80b2c097847617dc00cf6
Contents?: true
Size: 650 Bytes
Versions: 8
Compression:
Stored size: 650 Bytes
Contents
class CirculationStatus < ApplicationRecord 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 not null # display_name :text # note :text # position :integer # created_at :datetime # updated_at :datetime #
Version data entries
8 entries across 8 versions & 1 rubygems