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

Allow users to use normal currency formats for purchases. #1045

Merged
merged 1 commit into from
Jun 9, 2019
Merged

Allow users to use normal currency formats for purchases. #1045

merged 1 commit into from
Jun 9, 2019

Conversation

reese
Copy link
Collaborator

@reese reese commented Jun 8, 2019

Resolves #1022

Description

This PR allows users to input normal currency values when making purchases by stripping periods, commas, and dollar signs from input before saving. The draw back is that it doesn't actually check that it's a valid input (i.e. "123$4..345" would still work), but I would imagine this is not a use case we're concerned with.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

This PR includes tests that involve input with dollar signs, commas, and periods. These tests, as well as existing tests, all still pass.

@seanmarcia
Copy link
Member

seanmarcia commented Jun 9, 2019

Hey @reese, this is awesome, thank you so much! We'll merge this in but had one further request! I just noticed that items are also incorrectly using cents instead of normal currency format. Any chance you'd want to take on that too? I'm happy to create an issue too!

@seanmarcia seanmarcia merged commit e54181d into rubyforgood:master Jun 9, 2019
@reese
Copy link
Collaborator Author

reese commented Jun 9, 2019

@seanmarcia Sure, I'd be happy to take it on. If you just make an issue for it, that'd be great, and then I can take it from there!

@reese reese deleted the 1022-allow-normal-money-format-for-purchases branch June 9, 2019 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When making a purchase, all the user to use normal money values instead of requiring input in cents
2 participants