[英]Do not redirect to login page after session timeout
如果要在會話過期后重定向用戶在主頁上。
在application_controller中粘貼此代碼
def after_sign_out_path_for(resource)
root_url
end
在devise.rb文件中取消注釋此行
config.timeout_in = 2.minutes
設置時間並重新啟動服務器。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.