Class: LineItem
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- LineItem
- Defined in:
- app/models/line_item.rb
Instance Method Summary collapse
-
#assign_item=(value) ⇒ Object
Attributes.
- #total_amount ⇒ Object
Instance Method Details
#assign_item=(value) ⇒ Object
Attributes
11 12 13 14 15 16 17 |
# File 'app/models/line_item.rb', line 11 def assign_item=(value) self.item = value self.price = value.price self.title = value.title self.code = value.code end |
#total_amount ⇒ Object
19 20 21 |
# File 'app/models/line_item.rb', line 19 def total_amount times * price.to_f end |