Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert everything to cents #14

Open
eirvandelden opened this issue Aug 2, 2020 · 0 comments
Open

Convert everything to cents #14

eirvandelden opened this issue Aug 2, 2020 · 0 comments
Labels
bug Something isn't working important Thing that should be picked up sooner

Comments

@eirvandelden
Copy link
Owner

eirvandelden commented Aug 2, 2020

When working with financial application, it is advised to save everything in Integers. Working with Floats can lead to rounding errors.

Save everything as price_in_cents, display it all as price currency.

Use a "virtual attribute" (i.e def price=', def price`), see http://railscasts.com/episodes/16-virtual-attributes-revised

@eirvandelden eirvandelden added bug Something isn't working important Thing that should be picked up sooner labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working important Thing that should be picked up sooner
Projects
None yet
Development

No branches or pull requests

1 participant