Skip to main content
Ask A Question
Notifications
You’re not receiving notifications from this thread.
Subscribe

Subdomains Email reset with Devise

Gems / Libraries • Asked by Francisco Quinones

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.


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.


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 30,005+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.