Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class LineItem < ApplicationRecord
- belongs_to :order, optional: true
- belongs_to :product
- belongs_to :cart
- def total_price
- product.price * quantity
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement