This project is archived and is in readonly mode.
ActiveRecord::Base.compute_type swallows NoMethodError
-
Andrew Bloomgarden
- Tag changed from bug, rails3, regression to bug, patch, rails3, regression
Here's the patch and a (now-passing) test.
-
Andrew Bloomgarden
I've updated the patch to include tests on compute_type's standard behavior.
-
Michael Koziarski
- Milestone cleared.
-
Andrew White
Perhaps we should re-raise the error if it's not explicity NameError since although NoMethodError is the only standard error that's a subclass of NameError, Rails adds AR::UnknownAttributeError and AR::MissingAttributeError plus there are plugins and gems that add subclasses of NameError as well.
e.g:
rescue NameError => e raise e unless e.instance_of(NameError) -
Repository
- State changed from new to resolved
(from [0e9b9d59859efa46a82b56e0715784fa52656650]) Fix ActiveRecord::Base.compute_type swallowing NoMethodError. [#4751 ActiveRecord::Base.compute_type swallows NoMethodError state:resolved]
Signed-off-by: David Heinemeier Hansson david@loudthinking.com
http://github.com/rails/rails/commit/0e9b9d59859efa46a82b56e0715784...
