提交 8ea64bd0 编写于 作者: A Aaron Patterson

remove more mutations from the `build` method

上级 faf4a39c
......@@ -8,13 +8,8 @@ def valid_options
super + [:join_table, :association_foreign_key]
end
def build
reflection = super
define_destroy_hook
reflection
end
def define_destroy_hook
def define_callbacks(model, reflection)
super
name = self.name
model.send(:include, Module.new {
class_eval <<-RUBY, __FILE__, __LINE__ + 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册