Skip to content

Instantly share code, notes, and snippets.

@marciol
Created June 13, 2012 15:21
Show Gist options
  • Save marciol/2924737 to your computer and use it in GitHub Desktop.
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/
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