2016-06-28 29 views

回答

1

您將需要重寫設計確認控制器。 在routes.rb中加入這一行

devise_for :users, controllers: { confirmations: 'confirmations' } 

在創建文件並粘貼此代碼

class ConfirmationsController < Devise::ConfirmationsController 

    private 

    def after_confirmation_path_for(resource_name, resource) 
    your_new_after_confirmation_path #your path where you want to land 
    end 

end 

,你可能還需要重新啓動服務器。

來源:https://github.com/plataformatec/devise/wiki/How-To:-Add-:confirmable-to-Users#redirecting-user