Created
October 16, 2012 10:39
-
-
Save ohadlevy/3898599 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
diff --git a/app/models/lookup_key.rb b/app/models/lookup_key.rb | |
index 256f07d..5c45396 100644 | |
--- a/app/models/lookup_key.rb | |
+++ b/app/models/lookup_key.rb | |
@@ -150,8 +150,8 @@ class LookupKey < ActiveRecord::Base | |
begin | |
self.default_value = cast_validate_value self.default_value | |
true | |
- rescue | |
- errors.add(:default_value, "is invalid") | |
+ rescue => e | |
+ errors.add(:default_value, "#{default_value}.inspect is invalid for #{to_s}: #{e}") | |
false | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment