1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Updating timeoutable with last devise changes.

This commit is contained in:
Carlos Antonio da Silva 2009-11-22 22:58:16 -02:00
parent fc89db636a
commit 10a70b8192
2 changed files with 3 additions and 4 deletions

View file

@ -12,13 +12,12 @@ module Devise
# Checks whether the user session has expired based on configured time.
def timeout?(last_access)
last_access && last_access <= timeout.ago.utc
last_access && last_access <= self.class.timeout.ago.utc
end
module ClassMethods
Devise::Models.config(self, :timeout)
end
Devise::Models.config(self, :timeout)
end
end
end

View file

@ -115,7 +115,7 @@ class ActiveRecordTest < ActiveSupport::TestCase
end
test 'set a default value for timeout' do
assert_equal 15.minutes, Configurable.new.timeout
assert_equal 15.minutes, Configurable.timeout
end
test 'set null fields on migrations' do