0
Rails的文檔的色器件說,對於如何重定向的說明是不正確的:Rails的設計可證實 - 改
https://github.com/plataformatec/devise/wiki/How-To:-Add-:confirmable-to-Users#redirecting-user
有誰知道如何做到這一點?
Rails的文檔的色器件說,對於如何重定向的說明是不正確的:Rails的設計可證實 - 改
https://github.com/plataformatec/devise/wiki/How-To:-Add-:confirmable-to-Users#redirecting-user
有誰知道如何做到這一點?
您將需要重寫設計確認控制器。 在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
你試過'after_confirmation_path_for'? – niceman