I've got a
base_price field, a
shipping_price field, and a
It's a simple
total_price. For some reason, I cannot get this simple calculation to work when saving my model.
Here's my code:
self.total_price.to_i = self.base_price.to_i + self.shipping_price.to_i
It's failing to make the calculation and save it in the database and I'm not really getting an error as to why.