我使用localhost:3000上的确认电子邮件进行注册。在我development.rb我补充这样1个错误禁止该用户保存:确认令牌无效
config.action_mailer.default_url_options = {:host => 'localhost:3000'}
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => 'smtp.gmail.com',
:port => '587',
:authentication => :plain,
:user_name => '[email protected]',
:password => 'mypassword',
:domain => 'localhost:3000',
:enable_starttls_auto => true
}
时,我已经注册我打开我的电子邮件,然后在收件箱中显示的消息可以确认,通过下面的链接您的帐户电子邮件:确认我的帐户我点击这个链接。它重定向到本地主机:3000 /用户/ sign_in,当我在我的收件箱中点击这个链接(确认我有分)。它再次显示错误,这样我就可以登录成功。但:
在URL:http://localhost:3000/users/confirmation?confirmation_token=dWUeHVP_N7VzsVwvkNW5
meassage错误:
Resend confirmation instructions
1 error prohibited this user from being saved:
Confirmation token is invalid
在当我点击链接我的电子邮件收件箱
“确认我的帐户”再次我希望它重定向到本地主机:3000 /用户/ sign_in。如何再次点击链接“确认我的帐户”时,我如何重定向到localhost:3000/users/sign_in?请帮帮我!
你在使用设计吗? – 2014-09-01 09:02:45
是的,我正在使用设计 – 2014-09-01 09:05:40