mirror of
https://github.com/github/rails.git
synced 2026-02-18 01:51:49 -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:
@@ -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]
|
||||
|
||||
@@ -163,7 +163,7 @@ class Dispatcher
|
||||
end
|
||||
end
|
||||
|
||||
self.preparation_callbacks = []
|
||||
self.preparation_callbacks ||= []
|
||||
self.preparation_callbacks_run = false
|
||||
|
||||
end
|
||||
|
||||
@@ -551,6 +551,7 @@ module Rails
|
||||
#
|
||||
# See Dispatcher#to_prepare.
|
||||
def to_prepare(&callback)
|
||||
require 'dispatcher' unless defined?(::Dispatcher)
|
||||
Dispatcher.to_prepare(&callback)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user