1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-04 04:55:20 +02:00

Update hard-coded currency UI with currency specific params (#488)

* Update hard-coded currency UI with currency specific params

* Rename extension methods to match currency option names; Move cents extension to numeric class extension

* Use currency's precision to show the cents part in accounts show page

---------

Co-authored-by: Sriram Krishnan <sriram@seafoodsouq.com>
This commit is contained in:
Sriram 2024-02-27 20:10:48 +05:30 committed by GitHub
parent 1968fb0145
commit 7e883c4439
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 78 additions and 5 deletions

View file

@ -0,0 +1,13 @@
class String
def unit
CURRENCY_OPTIONS[self.to_sym][:unit]
end
def separator
CURRENCY_OPTIONS[self.to_sym][:separator]
end
def precision
CURRENCY_OPTIONS[self.to_sym][:precision]
end
end