diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-12-01 05:37:56 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-12-01 05:37:56 +0000 |
commit | e8eb743ba679ccfe13e3cd15f140b539f1562340 (patch) | |
tree | 01fcd9d77f83859addec3c929f2227b0a08f775b /railties/lib | |
parent | 9040f406820a9cd2d6a016fd2a7965d21445bbec (diff) | |
download | rails-e8eb743ba679ccfe13e3cd15f140b539f1562340.tar.gz rails-e8eb743ba679ccfe13e3cd15f140b539f1562340.tar.bz2 rails-e8eb743ba679ccfe13e3cd15f140b539f1562340.zip |
Replace the elaborate reloading connection checking scheme, just fix the Ruby-based MySQL adapter, ye?
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5656 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/dispatcher.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/railties/lib/dispatcher.rb b/railties/lib/dispatcher.rb index 31eb5d2317..ce6f505895 100644 --- a/railties/lib/dispatcher.rb +++ b/railties/lib/dispatcher.rb @@ -62,7 +62,7 @@ class Dispatcher Class.remove_class(*Reloadable.reloadable_classes) end - ActiveRecord::Base.clear_reloadable_connections! if defined?(ActiveRecord) + ActiveRecord::Base.clear_active_connections! if defined?(ActiveRecord) end # Add a preparation callback. Preparation callbacks are run before every @@ -76,16 +76,13 @@ class Dispatcher def to_prepare(identifier = nil, &block) unless identifier.nil? callback = preparation_callbacks.detect { |ident, _| ident == identifier } - if callback # Already registered: update the existing callback callback[-1] = block return end end - preparation_callbacks << [identifier, block] - - return + nil end private |