Ruby on Rails
Tuesday, September 24, 2013
What is the best way to convert a currency string 'USD' to locale :en-US? Right now trying to make it flexible to show the money and symbol correctly based on the currency string (like 'USD' or 'AUD') stored against the user's record.
-- I need to be able to do the following based on say 'GBP' string:
<%= number_to_currency(1234567890.506, :locale => :en-GB) %>
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6a048984-c6e2-4d36-a947-96f3327a1f74%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment