2014-11-05 72 views
3

檢查了幾個問題,如後:回報率3.2色器件(3.2.2):timeoutable不工作

rails 3.1, devise gem, :timeoutable is not working, why?

Devise - Timeout not working

devise config.timeout_in not working

How to configure time out using devise?

我已經把我的用戶模式:可關閉

class User < ActiveRecord::Base 
devise :rememberable, :demo_authenticatable, :api_authenticatable,:registerable, 
:recoverable, :trackable, :validatable, :confirmable, :lockable, :timeoutable 

而且我也uncomented在devise.rb文件

config.timeout_in = 1.minutes 

我也tryed在用戶模式設置timeout_in屬性timeout_in線,但我一直在

任何線索beeing記錄?

在此先感謝,歡呼!

回答

2

如果您希望在刷新時向您顯示登錄頁面,請從模型中刪除超時部分,並將其放入devise.rb NOT development.rb &重新啓動rails服務器。 config.timeout_in = 1.hour