Skip to content

Commit

Permalink
Allow config.to_prepare to work, make the dispatcher safe to 're requ…
Browse files Browse the repository at this point in the history
…ire'. [Koz, Nicholas Seckar]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5792 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
NZKoz committed Dec 26, 2006
1 parent 29ec023 commit c6d4780
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions railties/CHANGELOG
@@ -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]
Expand Down
2 changes: 1 addition & 1 deletion railties/lib/dispatcher.rb
Expand Up @@ -163,7 +163,7 @@ def failsafe_response(output, status, exception = nil)
end
end

self.preparation_callbacks = []
self.preparation_callbacks ||= []
self.preparation_callbacks_run = false

end
Expand Down
1 change: 1 addition & 0 deletions railties/lib/initializer.rb
Expand Up @@ -551,6 +551,7 @@ def after_initialize_block
#
# See Dispatcher#to_prepare.
def to_prepare(&callback)
require 'dispatcher' unless defined?(::Dispatcher)
Dispatcher.to_prepare(&callback)
end

Expand Down

0 comments on commit c6d4780

Please sign in to comment.