Handling Decimal Precision in Rails - DEV Community
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 #dev