Add timeout to user

This commit is contained in:
chris 2012-12-03 21:45:00 +08:00
parent fbe2b26e9f
commit 9254b9960d
2 changed files with 2 additions and 1 deletions

View File

@ -3,7 +3,7 @@ class User
include Mongoid::Document
include Mongoid::Timestamps
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :registerable
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :registerable, :timeoutable
mount_uploader :avatar, AvatarUploader

View File

@ -80,6 +80,7 @@ Devise.setup do |config|
# The time you want to timeout the user session without activity. After this
# time the user will be asked for credentials again.
# config.timeout_in = 10.minutes
config.timeout_in = 10.minutes
# ==> Configuration for :lockable
# Defines which strategy will be used to lock an account.