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:
parent
29ec023add
commit
c6d47806bf
3 changed files with 4 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
||||||
*SVN*
|
*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 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]
|
* Fix Webrick Daemon dispatching bug regarding a bad current working directory. Closes #4899 [Rick Olson]
|
||||||
|
|
|
@ -163,7 +163,7 @@ class Dispatcher
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
self.preparation_callbacks = []
|
self.preparation_callbacks ||= []
|
||||||
self.preparation_callbacks_run = false
|
self.preparation_callbacks_run = false
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -551,6 +551,7 @@ module Rails
|
||||||
#
|
#
|
||||||
# See Dispatcher#to_prepare.
|
# See Dispatcher#to_prepare.
|
||||||
def to_prepare(&callback)
|
def to_prepare(&callback)
|
||||||
|
require 'dispatcher' unless defined?(::Dispatcher)
|
||||||
Dispatcher.to_prepare(&callback)
|
Dispatcher.to_prepare(&callback)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue