Currently the REGEX that formats the currency string is hard coded in 
/activesupport/lib/active_support/number_helper/number_to_delimited_converter.rb

There are cases where the default format mask has to be overridden. For 
example, In India, the currency units are different than the international 
units. And so is the currency formatting. See the table below 


In the USA      In India

One Hundred Thousand (100,000)           One Lakh (1,00,000)

Million (1,000,000)   
          Ten Lakhs (10,00,000)

Ten Millions (10,000,000)           One Crore (1,00,00,000)



As you can notice, number formatting changes a bit. Initial grouping of 
digits starts with 3 digits (R to L), thereafter grouping is of 2 digits.


I would like to remove the hard coded DELIMIT_REGEX and instead make it an 
optional attribute that can be passed from locale file. 

I have made the code changes and added a test case too. See Pull Request 
#21394


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to