Open
Description
def current_user
begin
@current_user ||= User.find(session[:user_id]) if session[:user_id]
rescue Exception => e
nil
end
end
It is bad practice to rescue Exception
, see http://stackoverflow.com/questions/10048173/why-is-it-bad-style-to-rescue-exception-e-in-ruby
Metadata
Metadata
Assignees
Labels
No labels