提交 eedca4a1 编写于 作者: C Carlos Antonio da Silva

Merge pull request #6940 from acapilleri/observer_update

Observer #update refactoring
......@@ -238,8 +238,7 @@ def observed_classes #:nodoc:
# Send observed_method(object) if the method exists and
# the observer is enabled for the given object's class.
def update(observed_method, object, *extra_args, &block) #:nodoc:
return unless respond_to?(observed_method)
return if disabled_for?(object)
return if !respond_to?(observed_method) || disabled_for?(object)
send(observed_method, object, *extra_args, &block)
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册