-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Spree::Money should be comparable #1650
Comments
We'd like |
@eoinkelly How do you want to implement this? I think we only should allow comparing Money objects that have the same currency with |
@kennyadsl I agree. That seems to be how
@eoinkelly A PR would be most welcome |
Not comparing across currencies seems sensible. I'll have a go at a PR and then we'll have something concrete to discuss. |
Is there a reason why
Spree::Money
does not implement<=>
and includeComparable
? The current implementation manually implements#==
but not<=>
. I think it would be convenient to be able to sortSpree::Money
instances directly rather than having to reach into their wrappedMoney
instances.I'm happy to have a go at a PR for this. Is there any constraint/reason I'm not seeing that would make it a bad idea?
The text was updated successfully, but these errors were encountered: