Created
June 8, 2009 13:01
-
-
Save bluescreen303/125803 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit ed7b0029a324558d0da1d0521b7a29949448b6f1 | |
Author: Mathijs Kwik <[email protected]> | |
Date: Tue May 26 18:17:10 2009 +0200 | |
rescue when user context got removed | |
diff --git a/app/controllers/user_context_handler.rb b/app/controllers/user_context_handler.rb | |
index 5ebc2db..d74eb97 100644 | |
--- a/app/controllers/user_context_handler.rb | |
+++ b/app/controllers/user_context_handler.rb | |
@@ -87,7 +87,7 @@ class UserContextHandler | |
end | |
def to_object(obj_combo) | |
- obj_combo[0].constantize.find(obj_combo[1]) if Array === obj_combo | |
+ obj_combo[0].constantize.find(obj_combo[1]) if Array === obj_combo rescue nil | |
end | |
def to_combo(obj) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment