I was wondering if there was a way to round a number in the model, so that I would not have to round the number to my specified decimal places anywhere else but there.
I looked at these two posts, but neither answered my question:
- Rails 3. How to explicitly round a number to two decimal places in the model? [duplicate]
- Rails 3. How to display two decimal places in edit form?
The first being a supposed duplicate of the second, but in my opinion it is not. Regardless, neither answered my question clearly.
Is there any possible way of rounding floats once in the model?