Sha256: e1f1dc7af79ecb32ad3e073706f831df0965eca405aaf437bbe58dff7f1f94bb
Contents?: true
Size: 247 Bytes
Versions: 13
Compression:
Stored size: 247 Bytes
Contents
module MechanizeStore class OrderItem < ActiveRecord::Base belongs_to :order belongs_to :product validates :quantity, :price, :product_id, presence: true def total self.quantity.to_f * self.price.to_f end end end
Version data entries
13 entries across 13 versions & 1 rubygems