diff options
author | Rick Olson <technoweenie@gmail.com> | 2007-06-15 23:28:51 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2007-06-15 23:28:51 +0000 |
commit | 9d4225f1298bebacc04cc0055b180c6b2926c024 (patch) | |
tree | 807de561d10e6ecead72aa854cb1cf07391d4dc5 /railties/lib | |
parent | 1ddaec1e68ae35509d665dbfc5d7f9ae87f41962 (diff) | |
download | rails-9d4225f1298bebacc04cc0055b180c6b2926c024.tar.gz rails-9d4225f1298bebacc04cc0055b180c6b2926c024.tar.bz2 rails-9d4225f1298bebacc04cc0055b180c6b2926c024.zip |
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
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/dispatcher.rb | 3 |
1 files changed, 1 insertions, 2 deletions
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 |