Sha256: 42f686b793078efc0b1554b9b1b5e64a0090853ce7901c1d283f0fdd1c961fa1

Contents?: true

Size: 315 Bytes

Versions: 9

Compression:

Stored size: 315 Bytes

Contents

module CabooseStore
  class OrderLineItem < ActiveRecord::Base
    self.table_name = "store_order_line_items"
    
    belongs_to :variant
    belongs_to :order  
    attr_accessible :id, :variant_id, :quantity, :quantity_shipped
    
    def subtotal
      return self.unit_price * self.quantity
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
caboose-store-0.0.10 app/models/caboose_store/order_line_item.rb
caboose-store-0.0.9 app/models/caboose_store/order_line_item.rb
caboose-store-0.0.8 app/models/caboose_store/order_line_item.rb
caboose-store-0.0.7 app/models/caboose_store/order_line_item.rb
caboose-store-0.0.6 app/models/caboose_store/order_line_item.rb
caboose-store-0.0.5 app/models/caboose_store/order_line_item.rb
caboose-store-0.0.4 app/models/caboose_store/order_line_item.rb
caboose-store-0.0.3 app/models/caboose_store/order_line_item.rb
caboose-store-0.0.2 app/models/caboose_store/order_line_item.rb