lib/active_model/callbacks.rb in activemodel-4.2.0.beta3 vs lib/active_model/callbacks.rb in activemodel-4.2.0.beta4
- old
+ new
@@ -95,9 +95,12 @@
# class AnotherClass
# def self.before_create( obj )
# # obj is the MyModel instance that the callback is being called on
# end
# end
+ #
+ # NOTE: +method_name+ passed to `define_model_callbacks` must not end with
+ # `!`, `?` or `=`.
def define_model_callbacks(*callbacks)
options = callbacks.extract_options!
options = {
terminator: ->(_,result) { result == false },
skip_after_callbacks_if_terminated: true,