Skip to content

Instantly share code, notes, and snippets.

@mfpiccolo
Created March 31, 2015 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfpiccolo/ce10e789035d2ecb13bd to your computer and use it in GitHub Desktop.
Save mfpiccolo/ce10e789035d2ecb13bd to your computer and use it in GitHub Desktop.
Money Rails with 4 decimal places
MoneyRails.configure do |config|
config.register_currency = {
:priority => 1,
:iso_code => "USD1",
:name => "USD with subunit of 4 digits",
:symbol => "$",
:symbol_first => true,
:subunit => "Subcent",
:subunit_to_unit => 10000,
:thousands_separator => ",",
:decimal_mark => "."
}
config.add_rate "USD", "USD1", 1
config.add_rate "USD1", "USD", 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment