Don't raise AR::RecordNotFound if there is no id

openid
Micha Wrobel 13 years ago
parent 0190c3f049
commit ce67e84a60

@ -9,7 +9,7 @@ class ApplicationController < ActionController::Base
private
def current_user
@current_user ||= User.find(session[:user_id]) if session[:user_id]
@current_user ||= User.first(:id => session[:user_id]) if session[:user_id]
end
def current_user=(user)

Loading…
Cancel
Save