Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

generate_unlocalized_routes results in default locale path rendering in url_for #29

astjohn opened this Issue Jul 28, 2013 · 4 comments


None yet
3 participants

astjohn commented Jul 28, 2013

As I mentioned in #26, when I add generate_unlocalized_routes to true in an initializer, everything works except that the paths rendered on the page fall back to the default url. For example, with an app using English as the default locale, when visiting the Spanish page, everything is translated except for links on the page. Those are still rendering the default url paths instead of the spanish ones. Visiting a link would, of course, take the user back to the English page.

I tried to reproduce this using tests, but unfortunately, I can't reproduce the problem. Please see this commit:

Any insight is greatly appreciated.


astjohn commented Jul 29, 2013

A bit of an update. The position in which add_untranslated_helpers_to_controllers_and_views is executed affects the rendering of my links' url_for paths. Moving that method to be the last addition fixes my issues. See here:


Before this change, I was experiencing the error as described above. After this change, all of my url's in the non-default locale, such as Spanish, render properly. When visiting the default url, in this case English, all of my links are scoped under the English locale, which I can live with. It would be nice for the default locale to drop the scoping however.

Any thoughts? Are you still maintaining this gem?


gi-lunaweb commented Jul 22, 2014

I try to reproduce this using tests. This lead me to refactor integration tests so the new hosts_locales configuration options does not interfere with other tests but I can't see your problem.

Is this issue still relevant ?


astjohn commented Jul 22, 2014

@gi-lunaweb, I'll try your latest and let you know what happens.


enriclluelles commented Oct 22, 2014

It's been a while so I'm closing this. Please reopen if the problem persists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment