Sha256: 184a1f14bd0947f33ad452c231b1c27e33b9f35735504202a20aa686613b09f6

Contents?: true

Size: 185 Bytes

Versions: 3

Compression:

Stored size: 185 Bytes

Contents

module MechanizeStore
  class OrderItem < ActiveRecord::Base
    belongs_to :order
    belongs_to :product

    def total
        self.quantity.to_f * self.price.to_f
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mechanize_store-0.0.5 app/models/mechanize_store/order_item.rb
mechanize_store-0.0.4 app/models/mechanize_store/order_item.rb
mechanize_store-0.0.3 app/models/mechanize_store/order_item.rb