class CartItem < ActiveRecord::Base
  belongs_to :product
  belongs_to :user

  def weight
    product.weight * quantity
  end
end

class CartItem < ActiveRecord::Base
  belongs_to :product
  belongs_to :user

  def weight
    product.weight * quantity
  end

  def cost
    product.price * quantity
  end
end

Add cost method for CartItem model
Add cost method for CartItem model
