Ask A Question


You’re not receiving notifications from this thread.

How can you allow users (companies) in your app to select their own currency?

Viktor Smári asked in General

We use i18n and we have our app in ~5 languages, but we want the companies to be able to select which currency to use.
Mainly to choose the correct symbol to show on their invoices to their customers.
This is not an e-commerce site, so no currency conversion is needed, only displaying of currency.


  • In company settings, there would be box with all the available currencies from i18n or similar A company in Netherlands can have the app in English but choose the Euro currency. A company in Argentina can have the app in Spanish but use the Argentine peso (and not the Euro) We have done extensive research and found no clear answer to this. Maybe the answer is too obvious and we missed it? Related unanswered questions:

You could add a currency field to your Company model, and allow it do be modified through the CompaniesController#edit action. This way I can have my locale as Spanish, but select any currency that I want and see that across the application.

  1. How do you generate your list of currencies? Do you use the money gem?
  2. How do you display the currency format, which helper do you use, if any?

The number_to_currency helper is useful for this and I highly recommend the money gem.

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 83,453+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.