Ask A Question


You’re not receiving notifications from this thread.

Subdomains Email reset with Devise

Francisco Quinones asked in Gems / Libraries

Hi Chris so im trying to work with subdomain and maindomain email reset password
I use the code on devise and for subdomain work like a charm but for the main domain I get this erro because they down have @company.subdomain

<%= link_to 'Cambiar contraseña', edit_password_url(@resource, reset_password_token: @token, :subdomain => %>

any need to use it only if reques is from a subdomain.


You'll want to probably use an if statement there to send it without the subdomain option. I know you can include helpers into the mailers so that could be a nice place to put the logic for the subdomain option.

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.