aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/railtie.rb
diff options
context:
space:
mode:
authorJosé Valim and Mikel Lindsaar <pair@programming.com>2010-01-24 23:59:29 +0100
committerJosé Valim and Mikel Lindsaar <pair@programming.com>2010-01-24 23:59:29 +0100
commit90e9e46576c0a8d57887484cd4f3f51b3b6cce3a (patch)
treede254a8fd31ae36f8b9371c9f0e645c7ed1b727d /actionpack/lib/action_dispatch/railtie.rb
parent0ece244feec236f57fb2f55ea564409f25475923 (diff)
parent4e96442c4e404141830b2d7f0d850b6556190b39 (diff)
downloadrails-90e9e46576c0a8d57887484cd4f3f51b3b6cce3a.tar.gz
rails-90e9e46576c0a8d57887484cd4f3f51b3b6cce3a.tar.bz2
rails-90e9e46576c0a8d57887484cd4f3f51b3b6cce3a.zip
Merge branch 'master' of github.com:mikel/rails
Diffstat (limited to 'actionpack/lib/action_dispatch/railtie.rb')
-rw-r--r--actionpack/lib/action_dispatch/railtie.rb15
1 files changed, 2 insertions, 13 deletions
diff --git a/actionpack/lib/action_dispatch/railtie.rb b/actionpack/lib/action_dispatch/railtie.rb
index e4bd143e78..335daafc01 100644
--- a/actionpack/lib/action_dispatch/railtie.rb
+++ b/actionpack/lib/action_dispatch/railtie.rb
@@ -3,24 +3,13 @@ require "rails"
module ActionDispatch
class Railtie < Rails::Railtie
- plugin_name :action_dispatch
+ railtie_name :action_dispatch
# Prepare dispatcher callbacks and run 'prepare' callbacks
initializer "action_dispatch.prepare_dispatcher" do |app|
# TODO: This used to say unless defined?(Dispatcher). Find out why and fix.
require 'rails/dispatcher'
-
- unless app.config.cache_classes
- # Setup dev mode route reloading
- routes_last_modified = app.routes_changed_at
- reload_routes = lambda do
- unless app.routes_changed_at == routes_last_modified
- routes_last_modified = app.routes_changed_at
- app.reload_routes!
- end
- end
- ActionDispatch::Callbacks.before { |callbacks| reload_routes.call }
- end
+ ActionDispatch::Callbacks.to_prepare { app.routes_reloader.reload_if_changed }
end
end
end \ No newline at end of file