You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
tl;dr I'd like to only allow integer as parameter to
from_cents
. The intent is to avoid human error in the process.I'd like to raise an exception when a
float
value is passed tofrom_cents
:I understand it's useful when using with infinite precision, but when we're not using it, it's not needed and could cause confusion:
I could monkey-match it locally but doing that always has unintended consequences. Ideally we'd have some sort of config in an initializer somewhere.
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions