diff options
author | Iain Beeston <iain.beeston@gmail.com> | 2015-02-21 14:37:07 +0000 |
---|---|---|
committer | Iain Beeston <iain.beeston@gmail.com> | 2015-04-03 09:37:19 +0100 |
commit | d2876141d08341ec67cf6a11a073d1acfb920de7 (patch) | |
tree | 4d69bd159f9c16acb328adb680a090fc9f49470e /activerecord/CHANGELOG.md | |
parent | a05f3e5f96f7a8aa55483d91becdbe49b81833fd (diff) | |
download | rails-d2876141d08341ec67cf6a11a073d1acfb920de7.tar.gz rails-d2876141d08341ec67cf6a11a073d1acfb920de7.tar.bz2 rails-d2876141d08341ec67cf6a11a073d1acfb920de7.zip |
Raise ArgumentError if an unrecognised callback is skipped
At present, if you skip a callback that hasn't been defined,
activesupport callbacks silently does nothing. However, it's easy to
mistype the name of a callback and mistakenly think that it's being
skipped, when it is not.
This problem even exists in the current test suite.
CallbacksTest::SkipCallbacksTest#test_skip_person attempts to skip
callbacks that were never set up.
This PR changes `skip_callback` to raise an `ArgumentError` if the
specified callback cannot be found.
Diffstat (limited to 'activerecord/CHANGELOG.md')
0 files changed, 0 insertions, 0 deletions