Skip to content

Commit

Permalink
Merge pull request #36645 from Shopify/arel-dispatch-cache
Browse files Browse the repository at this point in the history
Share the Arel dispatch cache between connections
  • Loading branch information
kamipo committed Jul 10, 2019
2 parents 15748f6 + 50bb22d commit 2fa21fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/arel/visitors/visitor.rb
Expand Up @@ -15,7 +15,7 @@ def accept(object, collector = nil)
attr_reader :dispatch

def self.dispatch_cache
Hash.new do |hash, klass|
@dispatch_cache ||= Hash.new do |hash, klass|
hash[klass] = "visit_#{(klass.name || '').gsub('::', '_')}"
end
end
Expand Down

0 comments on commit 2fa21fe

Please sign in to comment.