diff options
author | Jon Leighton <j@jonathanleighton.com> | 2012-10-26 15:51:02 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2012-10-26 15:51:02 +0100 |
commit | 9e4c41c903e8e58721f2c41776a8c60ddba7a0a9 (patch) | |
tree | d580824995d5ea4866b1d976818f3e3d03a02e53 /activerecord/lib/active_record/connection_adapters | |
parent | a27b5178d9f1011545ecbf94008c5d890bab25d0 (diff) | |
download | rails-9e4c41c903e8e58721f2c41776a8c60ddba7a0a9.tar.gz rails-9e4c41c903e8e58721f2c41776a8c60ddba7a0a9.tar.bz2 rails-9e4c41c903e8e58721f2c41776a8c60ddba7a0a9.zip |
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.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb | 8 |
1 files changed, 4 insertions, 4 deletions
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 |