class Purchase < ActiveRecord::Base
  belongs_to :item

  def self.create_from(item)
    purchase = self.new
    purchase.item = item
    purchase.quantity = 1
    purchase.price = item.price
    return purchase
  end
end
