Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Give more information about validation methods that need to be overridden

#6328

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.

Reported by Mike Gehard · January 24th, 2011 @ 12:47 AM

State: resolved
Milestone: none
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. Roger Leite
  2. Mike Gehard
    Mike Gehard

    Seems that Lighthouse won't allow me to attach a file...

    January 28th, 2011 @ 07:45 PM

  3. Mike Gehard
    Mike Gehard

    Seems to be a problem with Chrome...I uploaded this patch from Firefox.

    January 28th, 2011 @ 07:47 PM

  4. Rohit Arondekar
    Rohit Arondekar
    • 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.

    January 29th, 2011 @ 01:09 PM

  5. Mike Gehard
    Mike Gehard

    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.

    February 9th, 2011 @ 01:35 PM

  6. Repository
    Repository
    • 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...

    March 12th, 2011 @ 03:44 PM