Sha256: 79cd0850fe6e6d2a87af595bd438c04d605a302a9f1a2dcb53f8e28422cfce1f

Contents?: true

Size: 549 Bytes

Versions: 10

Compression:

Stored size: 549 Bytes

Contents

class Inventory < ActiveRecord::Base
  belongs_to :item
  belongs_to :inventory_file

  validates_associated :item, :inventory_file
  validates_presence_of :item, :inventory_file
  validates_uniqueness_of :item_id, :scope => :inventory_file_id

  def self.per_page
    10
  end
end

# == Schema Information
#
# Table name: inventories
#
#  id                :integer         not null, primary key
#  item_id           :integer
#  inventory_file_id :integer
#  note              :text
#  created_at        :datetime
#  updated_at        :datetime
#

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
enju_inventory-0.0.8 app/models/inventory.rb
enju_inventory-0.1.3 app/models/inventory.rb
enju_inventory-0.1.2 app/models/inventory.rb
enju_inventory-0.0.7 app/models/inventory.rb
enju_inventory-0.1.1 app/models/inventory.rb
enju_inventory-0.0.6 app/models/inventory.rb
enju_inventory-0.0.5 app/models/inventory.rb
enju_inventory-0.1.0 app/models/inventory.rb
enju_inventory-0.0.4 app/models/inventory.rb
enju_inventory-0.0.3 app/models/inventory.rb