You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v0.9.0 introduced a side effect about I18n.locale_available? #70
Activity
oriolgual commentedon Nov 9, 2016
I think this has been fixed by #71, could you confirm @juno?
juno commentedon Nov 9, 2016
@oriolgual
Thank you for notifying.
I confirmed that the issue still exists with latest
masterbranch 9df6740. 😢This issue blocks a technique like an extracting locale from tld/params/etc which mentioned in Rails Guide:
However, since we using 0.9.0 with a following workaround, there are no problems at this time.
So, If it's OK with you, please close this issue. 👍
oriolgual commentedon Nov 9, 2016
Maybe we could change https://github.com/codegram/date_validator/blob/585cddda057edcf5409d7ba2d29c12ee947a5d7c/lib/date_validator/engine.rb so it only loads locales that are already available in the parent Rails app.
Something like this after line 4:
Could you patch your local gem and see if this solves it?
juno commentedon Nov 9, 2016
@oriolgual
Sure, I'll try it tomorrow.
juno commentedon Nov 14, 2016
@oriolgual
Sorry for late reply.
I checked vanilla rails app with codegram/date_validator master branch & patch.
Unfortunately, patch doesn't seem to solve the problem.
How to reproduce
Create vanilla rails app with date_validator master (not yet patched):
I18n.available_localesreturns locales within date_validator gem:Apply patch and debug prints:
$ bundle open date_validatorI18n.available_localesreturns same results: