Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

confirmation_url points to localhost

I am using Devise and omniauth for authentication in my rails app. I have followed readme and put the following line in my production.rb :

config.action_mailer.default_url_options = { :host => 
'http://morning-autumn-487.heroku.com' } 

My mailer has the following code:

<%= link_to 'Confirm my account',confirmation_url(@user, :confirmation_token =>
@user.confirmation_token) %>

When I upload the app to heroku, the confirmation mail has the following link for registration in the email : http://127.0.0.1:3000/users/confirmation?confirmation_token=8TyGWQo6y... Is there a setting that governs this host name ?

like image 527
Ved Avatar asked Dec 16 '22 18:12

Ved


1 Answers

Try with

config.action_mailer.default_url_options = { :host => 'morning-autumn-487.heroku.com' }
like image 71
David Sulc Avatar answered Dec 31 '22 03:12

David Sulc