From 9e4c41c903e8e58721f2c41776a8c60ddba7a0a9 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Fri, 26 Oct 2012 15:51:02 +0100 Subject: Remove ActiveRecord::Model In the end I think the pain of implementing this seamlessly was not worth the gain provided. The intention was that it would allow plain ruby objects that might not live in your main application to be subclassed and have persistence mixed in. But I've decided that the benefit of doing that is not worth the amount of complexity that the implementation introduced. --- .../active_record/connection_adapters/abstract/connection_pool.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'activerecord/lib/active_record/connection_adapters/abstract') diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb index 42bd16db80..1da95f451f 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb @@ -441,11 +441,11 @@ module ActiveRecord end def new_connection - ActiveRecord::Model.send(spec.adapter_method, spec.config) + Base.send(spec.adapter_method, spec.config) end def current_connection_id #:nodoc: - ActiveRecord::Model.connection_id ||= Thread.current.object_id + Base.connection_id ||= Thread.current.object_id end def checkout_new_connection @@ -567,10 +567,10 @@ module ActiveRecord class_to_pool[klass] ||= begin until pool = pool_for(klass) klass = klass.superclass - break unless klass < ActiveRecord::Tag + break unless klass <= Base end - class_to_pool[klass] = pool || pool_for(ActiveRecord::Model) + class_to_pool[klass] = pool end end -- cgit v1.2.3