1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

using the connection pool while visiting

This commit is contained in:
Aaron Patterson 2010-09-24 09:28:10 -07:00
parent 03724fb178
commit 7615bd7f92
2 changed files with 5 additions and 3 deletions

View file

@ -15,7 +15,7 @@ module Arel
end
def to_sql
visitor.accept @head
@visitor.accept @head
end
def initialize_copy other

View file

@ -9,8 +9,10 @@ module Arel
end
def accept object
@connection = @engine.connection
visit object
@engine.connection_pool.with_connection do |conn|
@connection = conn
visit object
end
end
private