Class | LineItem
In: | app/models/line_item.rb
Parent: | ActiveRecord::Base

### Methods

from_cart_item

### Public Class methods

from_cart_item(cart_item)

[Source]

        # File app/models/line_item.rb, line 4
     4:   def self.from_cart_item(cart_item)
     5:     li = self.new
     6:     li.product     = cart_item.product
     7:     li.quantity    = cart_item.quantity
     8:     li.total_price = cart_item.price
     9:     li
    10:   end

[Validate]