Created
June 13, 2012 15:21
-
-
Save marciol/2924737 to your computer and use it in GitHub Desktop.
Simple WithOut Callbacks monkey patch for Active::Support::Callbacks::ClassMethods inspired from http://jeffkreeftmeijer.com/2010/disabling-activemodel-callbacks/
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
| module ActiveSupport::Callbacks::ClassMethods | |
| def without_callback(*args, &block) | |
| skip_callback(*args) | |
| result = yield | |
| set_callback(*args) | |
| return result | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment