提交 8777ae1f 编写于 作者: A Aaron Patterson

reduce evals in depdendent associations

上级 a63a964a
......@@ -117,7 +117,8 @@ def #{macro}_dependent_for_#{name}
end
CODE
model.before_destroy "#{macro}_dependent_for_#{name}"
method = "#{macro}_dependent_for_#{name}"
model.before_destroy lambda { |o| o.public_send method }
end
def valid_dependent_options
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册