Sha256: d1d2dbe0c8b3b8fc06a401657af9daf1cfc11d66fb3634af90ec403ec640f213

Contents?: true

Size: 598 Bytes

Versions: 7

Compression:

Stored size: 598 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

  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

7 entries across 7 versions & 1 rubygems

Version Path
enju_inventory-0.0.11 app/models/inventory.rb
enju_inventory-0.1.7 app/models/inventory.rb
enju_inventory-0.1.6 app/models/inventory.rb
enju_inventory-0.0.10 app/models/inventory.rb
enju_inventory-0.1.5 app/models/inventory.rb
enju_inventory-0.1.4 app/models/inventory.rb
enju_inventory-0.0.9 app/models/inventory.rb