This project is archived and is in readonly mode.
Give more information about validation methods that need to be overridden
Reported by Mike Gehard | January 24th, 2011 @ 12:47 AM
ActiveModel::Validator and ActiveModel::EachValidator require subclasses to implement different methods. Currently these methods simply throw a NotImplementedError without any description of what needs to be implemented.
This patch adds some extra text to the exceptions to give the developer a better idea of what needs to be implemented in the subclasses.
Comments and changes to this ticket
-
Mike Gehard January 28th, 2011 @ 07:47 PM
Seems to be a problem with Chrome...I uploaded this patch from Firefox.
-
Rohit Arondekar January 29th, 2011 @ 01:09 PM
- State changed from new to open
- Assigned user set to José Valim
- Importance changed from to Low
This is definitely a good idea!
Patch applies cleanly to both master and 3-0-stable and the tests pass.
-
Mike Gehard February 9th, 2011 @ 01:35 PM
I found a couple more instances of where additional text would be helpful. I have recreated the patch to include the new additions. The enhance_abstract_method_exceptions.diff file is obsolete, please use the enhance_abstract_method_exceptions_take_2.diff.
-
Repository March 12th, 2011 @ 03:44 PM
- State changed from open to resolved
(from [58de03f077b0da1cb923f28835b00cd092de3c08]) Add additional text to NotImplementedErrors [#6328 state:resolved]
Signed-off-by: Santiago Pastorino santiago@wyeworks.com
https://github.com/rails/rails/commit/58de03f077b0da1cb923f28835b00...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 6328 Give more information about validation methods that need to be overridden (from [58de03f077b0da1cb923f28835b00cd092de3c08]) Add add...