So I am using Devise and in my Forgot Password emails; it contains this:
<%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %>
The problem I am having is that the edit_password_url is making the link appear in emails without a ‘www’. I use a 301 redirect in my application_controller so when users click on the link in their emails; it will redirect to the homepage instead.
My question is: Is there any way to make edit_password_url include the www. in the URL? I’ve used the :protocol => "https" before but not sure if that would work with this somehow?
Thanks,
James F.
Simply add
:subdomain => 'www'to your edit_password_url hash of options