1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Allow config.to_prepare to work, make the dispatcher safe to 're require'. [Koz, Nicholas Seckar]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5792 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Michael Koziarski 2006-12-26 23:56:00 +00:00
parent 29ec023add
commit c6d47806bf
3 changed files with 4 additions and 1 deletions

View file

@ -1,5 +1,7 @@
*SVN*
* Allow config.to_prepare to work, make the dispatcher safe to 're require'. [Koz, Nicholas Seckar]
* Fix scaffold_resource generator so it respects the --pretend argument when creating the routes file. Closes #6852 [fearoffish]
* Fix Webrick Daemon dispatching bug regarding a bad current working directory. Closes #4899 [Rick Olson]

View file

@ -163,7 +163,7 @@ class Dispatcher
end
end
self.preparation_callbacks = []
self.preparation_callbacks ||= []
self.preparation_callbacks_run = false
end

View file

@ -551,6 +551,7 @@ module Rails
#
# See Dispatcher#to_prepare.
def to_prepare(&callback)
require 'dispatcher' unless defined?(::Dispatcher)
Dispatcher.to_prepare(&callback)
end