I have Sample App by Michael Hartl's “Ruby on Rails Tutorial”.
If I click on “Forget Password”, I've got email notification and if click on link “Reset password”, I’ve got redirected to the wrong app that doesn’t exist and I could see only empty page.
https://wrong.com/password_resets/WTk_raloURf8I8sCaXNNkg/edit?email=tatyana_p%70yahoo.com
That wrong app existed earlier but was already deleted. The code as below shows the correct host but the redirection happened to the wrong host.
ENV['SENDGRID_USERNAME']
and ENV['SENDGRID_PASSWORD']
are correct.
I could not find a wrong name of the host anywhere else in code and change it to the correct one.
config/environments/production.rb
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
host = 'correct_host.herokuapp.com'
config.action_mailer.default_url_options = { host: host }
ActionMailer::Base.smtp_settings = {
:address => 'smtp.sendgrid.net',
:port => '587',
:authentication => :plain,
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:domain => 'heroku.com',
:enable_starttls_auto => true
}
If I copy and paste an address that I've got when I click on "Reset password" and changed the wrong address on the right one - I've got the right fields for a password and confirming password.