I've recently taken over a Ruby on Rails app that makes use of the administrate gem for its admin dashboard.
Within this project, there is a product model where each product has an attribute for wholesale case price. This attribute, named wholesale_case_price_cents, stores values as integers. All prices in the application are managed as integers.
The problem I'm facing is that certain numbers entered into the admin dashboard input field end up converting to decimals. For example, entering the integer 3780 results in the value changing automatically to 3779.9999999999995 before submission. You can refer to the screenshot here: https://i.sstatic.net/DLuqd.png
It's important to note that this automatic conversion only occurs with specific numbers, not all. Check out another example in this screenshot: https://i.sstatic.net/m1qc2.png
The app also incorporates the administrate-field-money gem, money-rails gem, and monetize gem. My suspicion is that the issue lies with the administrate-field-money gem, although I haven't been able to identify a solution other than removing the gem entirely. Has anyone else faced this same challenge?