lib/devise/models/timeoutable.rb in devise-0.8.2 vs lib/devise/models/timeoutable.rb in devise-0.9.0

- old
+ new

@@ -1,10 +1,9 @@ require 'devise/hooks/timeoutable' module Devise module Models - # Timeoutable takes care of veryfing whether a user session has already # expired or not. When a session expires after the configured time, the user # will be asked for credentials again, it means, he/she will be redirected # to the sign in page. # @@ -15,10 +14,10 @@ def self.included(base) base.extend ClassMethods end # Checks whether the user session has expired based on configured time. - def timeout?(last_access) + def timedout?(last_access) last_access && last_access <= self.class.timeout_in.ago end module ClassMethods Devise::Models.config(self, :timeout_in)