Added support to new callbacks for around filter object that respond to...

Added support to new callbacks for around filter object that respond to :before & :after used in before|after callbacks
上级 2b166d30
...@@ -324,7 +324,11 @@ def #{method_name}(&blk) ...@@ -324,7 +324,11 @@ def #{method_name}(&blk)
else else
@klass.class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 @klass.class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
def #{method_name}(&blk) def #{method_name}(&blk)
#{method_name}_object.send("#{kind}_#{name}", self, &blk) if #{method_name}_object.respond_to?(:#{kind})
#{method_name}_object.#{kind}(self, &blk)
else
#{method_name}_object.send("#{kind}_#{name}", self, &blk)
end
end end
RUBY_EVAL RUBY_EVAL
end end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册