mirror of
https://github.com/we-promise/sure.git
synced 2026-04-25 23:14:10 +00: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:
13
config/initializers/string_extensions.rb
Normal file
13
config/initializers/string_extensions.rb
Normal 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
|
||||
Reference in New Issue
Block a user