Sha256: 8a0ddbbdfc830846828ace3bc2416cd1a2d385e0f701702fc9d5ab7ae6b08cd7
Contents?: true
Size: 970 Bytes
Versions: 27
Compression:
Stored size: 970 Bytes
Contents
class LendingPolicy < ActiveRecord::Base attr_accessible :item_id, :user_group_id, :loan_period, :fixed_due_date, :renewal, :fine, :note default_scope :order => 'position' belongs_to :item belongs_to :user_group validates_presence_of :item, :user_group validates_uniqueness_of :user_group_id, :scope => :item_id validates_date :fixed_due_date, :allow_blank => true def self.per_page 10 end acts_as_list :scope => :item_id end # == Schema Information # # Table name: lending_policies # # id :integer not null, primary key # item_id :integer not null # user_group_id :integer not null # loan_period :integer default(0), not null # fixed_due_date :datetime # renewal :integer default(0), not null # fine :decimal(, ) default(0.0), not null # note :text # position :integer # created_at :datetime # updated_at :datetime #
Version data entries
27 entries across 27 versions & 1 rubygems