提交 30075450 编写于 作者: N Nick Sieger

Minor tweak to retrieve_connection_pool -- recurse instead of loop

上级 113cc4e1
...@@ -271,12 +271,10 @@ def remove_connection(klass) ...@@ -271,12 +271,10 @@ def remove_connection(klass)
end end
def retrieve_connection_pool(klass) def retrieve_connection_pool(klass)
loop do pool = @connection_pools[klass.name]
pool = @connection_pools[klass.name] return pool if pool
return pool if pool return nil if ActiveRecord::Base == klass
return nil if ActiveRecord::Base == klass retrieve_connection_pool klass.superclass
klass = klass.superclass
end
end end
end end
end end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册