diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-23 15:05:13 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-23 16:06:33 +0100 |
commit | 80130d1201c3bf9dc17b0e1fcd81c6b22e893b0a (patch) | |
tree | 993d70e97ada23d2860969b24befbde64bd82e4b /railties/lib/rails/engine.rb | |
parent | 4eab3aad8d256b868390b739b075bd38661339b2 (diff) | |
download | rails-80130d1201c3bf9dc17b0e1fcd81c6b22e893b0a.tar.gz rails-80130d1201c3bf9dc17b0e1fcd81c6b22e893b0a.tar.bz2 rails-80130d1201c3bf9dc17b0e1fcd81c6b22e893b0a.zip |
Extract routes reloading responsibilities from application and load them just upon a request.
Diffstat (limited to 'railties/lib/rails/engine.rb')
-rw-r--r-- | railties/lib/rails/engine.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 03c78b6d4b..aaa669ef32 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -1,8 +1,6 @@ require 'active_support/core_ext/module/delegation' module Rails - # TODO Move I18n here - # TODO Set routes namespaces class Engine < Railtie class << self attr_accessor :called_from @@ -75,9 +73,9 @@ module Rails config.load_once_paths.freeze end - initializer :add_routing_files do |app| + initializer :add_routing_files do config.paths.config.routes.to_a.each do |route| - app.route_configuration_files.unshift(route) if File.exists?(route) + config.action_dispatch.route_files.unshift(route) if File.exists?(route) end end |