-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rails number_to_currency options #76
Comments
Just wait my patch :), I try to be quick :). |
Try fix dbde99f |
You should update |
@ai thank you! |
number_to_currency not working in model. any idea? |
Oops, I forget to create release :). I release new version after fix #80. You can use git master, just add to Gemfile:
|
included this in my gem file. |
Do you run |
yea I do bundle update. |
I add addition test 00959be and everythings is fine for me. Do you have format instructions in your locale? |
I am trying to use number_to_currency helper with :locale option and it works strange
Without r18n gem i get what i want as documented in the rails docs:
But when r18n is used, no matter what i pass in :location option i get the result with the current R18n locale, but not with a locale that i have provided.
So,
Ps. I need to provide a custom locale to this helper, because it depends on user.locale.
As i tried to understand, why this happens i tested
I18n.translate
methods (which are used in number_to_currency helper) with and without r18n and gotThen i found, that .translate method in R18n does not support locale option https://github.com/ai/r18n/blob/master/r18n-rails-api/lib/r18n-rails-api/backend.rb but only uses the current locale.
So i am a little bit confused.
What should i do, to get it working?
The text was updated successfully, but these errors were encountered: