Sha256: 2fafa297e6e54cdd075c7ea34643fcb74d4fd1ba4b11e949314d6a45e47ed266

Contents?: true

Size: 584 Bytes

Versions: 5

Compression:

Stored size: 584 Bytes

Contents

class Inventory < ActiveRecord::Base
  attr_accessible :item_id, :inventory_id, :note
  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

  paginates_per 10
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

5 entries across 5 versions & 1 rubygems

Version Path
enju_inventory-0.1.11.pre4 app/models/inventory.rb
enju_inventory-0.1.11.pre2 app/models/inventory.rb
enju_inventory-0.1.11.pre app/models/inventory.rb
enju_inventory-0.1.10 app/models/inventory.rb
enju_inventory-0.1.9 app/models/inventory.rb