From c485ae32490ccf98dcbea96af6218b25540f5eaa Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 7 Nov 2011 10:56:05 +0000 Subject: [PATCH] Fix object_id warning --- app/controllers/application_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index ec2f381fc..d58bc8922 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -35,8 +35,9 @@ class ApplicationController < ActionController::Base end end elsif session[:token] - @user = User.authenticate(:token => session[:token]) - session[:user] = @user.id + if @user = User.authenticate(:token => session[:token]) + session[:user] = @user.id + end end rescue Exception => ex logger.info("Exception authorizing user: #{ex.to_s}") -- 2.39.5