aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-12-01 05:56:51 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-12-01 05:56:51 +0000
commit2e2bf2d1494aa8b4efc4ff9e132dde4afd15ece1 (patch)
treebf2110842dc41d39e76c6dddf671a8e6d5ac9fd2 /railties/lib
parente8eb743ba679ccfe13e3cd15f140b539f1562340 (diff)
downloadrails-2e2bf2d1494aa8b4efc4ff9e132dde4afd15ece1.tar.gz
rails-2e2bf2d1494aa8b4efc4ff9e132dde4afd15ece1.tar.bz2
rails-2e2bf2d1494aa8b4efc4ff9e132dde4afd15ece1.zip
If only life was that simple (it didnt help)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5658 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/dispatcher.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/railties/lib/dispatcher.rb b/railties/lib/dispatcher.rb
index ce6f505895..31eb5d2317 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_active_connections! if defined?(ActiveRecord)
+ ActiveRecord::Base.clear_reloadable_connections! if defined?(ActiveRecord)
end
# Add a preparation callback. Preparation callbacks are run before every
@@ -76,13 +76,16 @@ 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]
- nil
+
+ return
end
private