Skip to content

Commit

Permalink
Giving a Symbol here might be a very little bit efficient than giving…
Browse files Browse the repository at this point in the history
… a String

since the key is goning to be converted to a Symbol later
  • Loading branch information
amatsuda committed Aug 26, 2019
1 parent 08604ee commit 24f1f82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions activerecord/lib/active_record/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ def self.configurations
self.filter_attributes = []

def self.connection_handler
Thread.current.thread_variable_get("ar_connection_handler") || default_connection_handler
Thread.current.thread_variable_get(:ar_connection_handler) || default_connection_handler
end

def self.connection_handler=(handler)
Thread.current.thread_variable_set("ar_connection_handler", handler)
Thread.current.thread_variable_set(:ar_connection_handler, handler)
end

self.default_connection_handler = ConnectionAdapters::ConnectionHandler.new
Expand Down

0 comments on commit 24f1f82

Please sign in to comment.