Sha256: 8cb13bc0da132f8b433f7e753fa043b222ac180e2ced0117295a607ec81bc49f

Contents?: true

Size: 651 Bytes

Versions: 2

Compression:

Stored size: 651 Bytes

Contents

class ItemHasUseRestriction < ActiveRecord::Base
  belongs_to :item, :validate => true
  belongs_to :use_restriction, :validate => true
  accepts_nested_attributes_for :use_restriction

  validates_associated :item, :use_restriction
  validates_presence_of :use_restriction
  validates_presence_of :item, :on => :update

  def self.per_page
    10
  end
end

# == Schema Information
#
# Table name: item_has_use_restrictions
#
#  id                 :integer         not null, primary key
#  item_id            :integer         not null
#  use_restriction_id :integer         not null
#  created_at         :datetime
#  updated_at         :datetime
#

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
enju_circulation-0.0.43 app/models/item_has_use_restriction.rb
enju_circulation-0.0.42 app/models/item_has_use_restriction.rb