From 0dd055f2eb356473cdee06b0eefc9a4a26b6d723 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 20 Apr 2012 09:06:45 +0200 Subject: [PATCH] Fixed name space conflict. --- app/controllers/application_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 6506024af..c2e86a545 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -94,9 +94,9 @@ class ApplicationController < ActionController::Base # check logon session if params['logon_session'] - session = ActiveRecord::SessionStore::Session.where( :session_id => params['logon_session'] ).first - if session - userdata = User.find( user_id = session.data[:user_id] ) + logon_session = ActiveRecord::SessionStore::Session.where( :session_id => params['logon_session'] ).first + if logon_session + userdata = User.find( user_id = logon_session.data[:user_id] ) end # set logon session user to current user