X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=app%2Fmodels%2Fline_item.rb;h=3e3afed73532113bdaae232dbbf698c4d97fff0d;hb=HEAD;hp=988324ce31782a3ecf6e441960390f484968b478;hpb=3ac66882338fa1c3f6d73ba68093b7fcfb399574;p=depot.git diff --git a/app/models/line_item.rb b/app/models/line_item.rb index 988324c..3e3afed 100644 --- a/app/models/line_item.rb +++ b/app/models/line_item.rb @@ -1,2 +1,12 @@ class LineItem < ActiveRecord::Base + belongs_to :order + belongs_to :product + +# def self.from_cart_item(cart_item) +# li = self.new +# li.product = cart_item.product +# li.quantity = cart_item.quantity +# li.total_price = cart_item.price +# li +# end end