提交 1e798ccb 编写于 作者: R Rafael França 提交者: GitHub

Merge pull request #28932 from kamipo/remove_method_missing_in_relation_delegation

Remove `method_missing` in `Relation::Delegation`
......@@ -113,15 +113,5 @@ def relation_class_for(klass)
def respond_to_missing?(method, _)
super || @klass.respond_to?(method) || arel.respond_to?(method)
end
def method_missing(method, *args, &block)
if @klass.respond_to?(method)
scoping { @klass.public_send(method, *args, &block) }
elsif arel.respond_to?(method)
arel.public_send(method, *args, &block)
else
super
end
end
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册