Ruby Money
23-Jun-2021 1531
In my current job, we faced calculation errors when operating with float for Money.After some investigation, we found this articleOur first approach was to find every usage of money attributes and parse them with BigDecimal.This solution has some drawbacks. First, we would need to replace it in many places. Second, it doesn't prevent future developers to use float.In order to overcome those issues, I wanted to enforce a validation over every money attribute.
Ruby Money #ruby #rubydeveloper #rubyonrails #Money https://rubyonrails.ba/link/ruby-money