From f4c9135947d926edf115929ec407e905a7a70111 Mon Sep 17 00:00:00 2001 From: Daniel Weinmann Date: Mon, 13 Feb 2012 11:47:16 -0200 Subject: [PATCH] Fixing a current_user bug --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 768a71273f..e43ce410aa 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -60,7 +60,7 @@ def current_user if cookies[:remember_me_id] and cookies[:remember_me_hash] @current_user = User.find(cookies[:remember_me_id]) @current_user = nil unless @current_user.remember_me_hash == cookies[:remember_me_hash] - session[:user_id] = @current_user.id + return session[:user_id] = @current_user.id end return @current_user = request.env['warden'].authenticate(:user) rescue nil rescue Exception => e