Ask A Question

Notifications

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
https://github.com/plataformatec/devise/wiki/How-To:-Send-emails-from-subdomains

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

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

Reply

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.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,946+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.