Ignore exceptions looking up a user from a session.
authorTom Hughes <tom@compton.nu>
Thu, 16 Aug 2007 13:07:24 +0000 (13:07 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 16 Aug 2007 13:07:24 +0000 (13:07 +0000)
app/controllers/application.rb

index bc61db5f95493e2c51dfcc2378b85883661d5c02..d22ed5c9f5d17154815873d93c238def19e6fbd5 100644 (file)
@@ -9,6 +9,9 @@ class ApplicationController < ActionController::Base
       @user = User.authenticate(:token => session[:token])
       session[:user] = @user.id
     end
+  rescue Exception => ex
+    logger.info("Exception authorizing user: #{ex.to_s}")
+    @user = nil
   end
 
   def require_user