diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-05-04 17:51:22 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-05-04 17:51:22 +0100 |
commit | 841c01fa0fa92aa6e3c2e5029444a9cbb4f161f3 (patch) | |
tree | 983a1cb482147b9a5c7519dc56c8d595ccbd999f /activerecord/lib/active_record/connection_adapters/abstract | |
parent | 6704d8c994d9d20d0cc9d71b72521e141c7dc05d (diff) | |
download | rails-841c01fa0fa92aa6e3c2e5029444a9cbb4f161f3.tar.gz rails-841c01fa0fa92aa6e3c2e5029444a9cbb4f161f3.tar.bz2 rails-841c01fa0fa92aa6e3c2e5029444a9cbb4f161f3.zip |
Use class_inheritable_accessor for connection_handler
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb index 2f36bec764..2493095a04 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb @@ -10,8 +10,8 @@ module ActiveRecord ## # :singleton-method: # The connection handler - cattr_accessor :connection_handler, :instance_writer => false - @@connection_handler = ConnectionAdapters::ConnectionHandler.new + class_inheritable_accessor :connection_handler, :instance_writer => false + self.connection_handler = ConnectionAdapters::ConnectionHandler.new # Returns the connection currently associated with the class. This can # also be used to "borrow" the connection to do database work that isn't @@ -54,7 +54,7 @@ module ActiveRecord raise AdapterNotSpecified unless defined?(Rails.env) establish_connection(Rails.env) when ConnectionSpecification - @@connection_handler.establish_connection(name, spec) + self.connection_handler.establish_connection(name, spec) when Symbol, String if configuration = configurations[spec.to_s] establish_connection(configuration) |