Handling Decimal Precision in Rails - DEV Community
10-Jun-2023 1754
Ruby on Rails allows us to specify how precise we want decimals to be by defining precision and scale in database migrations. Rails also provides a way of adding front-end validation to forms that accept decimal values. I’ll be using an expense model that lets a user track expense amounts as an example. I’ll also point out differences between SQLite and PostgreSQL in regards to saving decimals beyond constraints.
Handling Decimal Precision in Rails - DEV Community #ruby #rubydeveloper #rubyonrails #Handling #Decimal #Precision #Rails #Community #dev https://rubyonrails.ba/link/handling-decimal-precision-in-rails-dev-community