lib/authlogic/session/session.rb in authlogic-3.2.0 vs lib/authlogic/session/session.rb in authlogic-3.3.0
- old
+ new
@@ -33,11 +33,11 @@
persistence_token, record_id = session_credentials
if !persistence_token.nil?
# Allow finding by persistence token, because when records are created the session is maintained in a before_save, when there is no id.
# This is done for performance reasons and to save on queries.
record = record_id.nil? ?
- search_for_record("find_by_persistence_token", persistence_token) :
- search_for_record("find_by_#{klass.primary_key}", record_id)
+ search_for_record("find_by_persistence_token", persistence_token.to_s) :
+ search_for_record("find_by_#{klass.primary_key}", record_id.to_s)
self.unauthorized_record = record if record && record.persistence_token == persistence_token
valid?
else
false
end
\ No newline at end of file