提交 32bacb1c 编写于 作者: A Aaron Patterson

cache the name and options on the stack

上级 ea11af95
......@@ -25,8 +25,10 @@ def initialize(name, scope, options)
def define_callbacks(model, reflection)
super
name = reflection.name
options = reflection.options
CALLBACKS.each { |callback_name|
define_callback(model, callback_name, reflection.name, reflection.options)
define_callback(model, callback_name, name, options)
}
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册