lib/devise/models/timeoutable.rb in devise-1.5.4 vs lib/devise/models/timeoutable.rb in devise-2.0.0.rc
- old
+ new
@@ -21,22 +21,20 @@
extend ActiveSupport::Concern
# Checks whether the user session has expired based on configured time.
def timedout?(last_access)
return false if remember_exists_and_not_expired?
-
!timeout_in.nil? && last_access && last_access <= timeout_in.ago
end
def timeout_in
self.class.timeout_in
end
private
def remember_exists_and_not_expired?
- return false unless respond_to?(:remember_expired?)
-
+ return false unless respond_to?(:remember_created_at)
remember_created_at && !remember_expired?
end
module ClassMethods
Devise::Models.config(self, :timeout_in)