我使用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