Sha256: 4e6d6dca7ac7505047d9d0961502888f2e348de594fc6b390bc76a4ad9afb456

Contents?: true

Size: 532 Bytes

Versions: 2

Compression:

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

  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

2 entries across 2 versions & 1 rubygems

Version Path
enju_inventory-0.3.0 app/models/inventory.rb
enju_inventory-0.3.0.beta.1 app/models/inventory.rb