From 9d4225f1298bebacc04cc0055b180c6b2926c024 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Fri, 15 Jun 2007 23:28:51 +0000 Subject: Fixed that dispatcher preparation callbacks only run once in production mode. Mock Routes.reload so that dispatcher preparation callback tests run. [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7033 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/dispatcher.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'railties/lib') diff --git a/railties/lib/dispatcher.rb b/railties/lib/dispatcher.rb index fd39b1991b..83d73c4aa3 100644 --- a/railties/lib/dispatcher.rb +++ b/railties/lib/dispatcher.rb @@ -88,7 +88,6 @@ class Dispatcher private attr_accessor_with_default :preparation_callbacks, [] attr_accessor_with_default :preparation_callbacks_run, false - alias_method :preparation_callbacks_run?, :preparation_callbacks_run # CGI.new plus exception handling. CGI#read_multipart raises EOFError # if body.empty? or body.size != Content-Length and raises ArgumentError @@ -113,7 +112,7 @@ class Dispatcher end def run_preparation_callbacks - return if preparation_callbacks_run? + return if preparation_callbacks_run preparation_callbacks.each { |_, callback| callback.call } self.preparation_callbacks_run = true end -- cgit v1.2.3