-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Configuring a locale in the url: /en/users/sign_in #205
Comments
In the stacktrace, with_locale goes through two passwordless methods. mailer.sign_in tries to build a magic_link with context.url_for and fails passwordless/context.rb:42:in `url_for' passwordless/mailer.rb:16:in `sign_in'
|
Yes, I believe this is due to how passwordless builds its urls. I'm afraid we don't support scoped urls like that currently. It is not something I have the bandwidth to add support for atm, but I'll gladly review and possibly include a nice PR if someone is up for the challenge. |
@andreaskundig If you need this url structure, you can set up your own routes and possibly controllers/mailers/routes. Use the built-in ones as a starting point. Will take a bit of work but it's possible. |
I've created a feature request issue in #206 |
I would like to use urls that include the locale, like /en/users/sign_in like documented in the rails i18n doc
I tried setting the scope like this:
/en/users/sign_in works, but when I enter an email and click on the button, I get
The error happens in I18n.with_locale, in the switch_locale function that I copied from the i18n rails doc
Is there a way to get this to work?
The text was updated successfully, but these errors were encountered: