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:
parent
fc89db636a
commit
10a70b8192
2 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue