diff options
author | José Valim <jose.valim@gmail.com> | 2010-03-06 19:19:26 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-06 19:25:55 +0100 |
commit | 028e54c63df84ad1ded1fb9c438eed540564552c (patch) | |
tree | a4b24b28b6da7974530c7433dc8fe09e268b9c47 /railties/lib/rails/engine.rb | |
parent | 67512b9489593ddcd1c0c87ba0052380355b5400 (diff) | |
download | rails-028e54c63df84ad1ded1fb9c438eed540564552c.tar.gz rails-028e54c63df84ad1ded1fb9c438eed540564552c.tar.bz2 rails-028e54c63df84ad1ded1fb9c438eed540564552c.zip |
Add mailers to paths in case someone wants to access it directly and ensures deep nesting works in controllers.
Diffstat (limited to 'railties/lib/rails/engine.rb')
-rw-r--r-- | railties/lib/rails/engine.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index f5cce857a2..8f5040ea13 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -82,7 +82,7 @@ module Rails initializer :add_routing_namespaces do |app| paths.app.controllers.to_a.each do |load_path| load_path = File.expand_path(load_path) - Dir["#{load_path}/*/*_controller.rb"].collect do |path| + Dir["#{load_path}/*/**/*_controller.rb"].collect do |path| namespace = File.dirname(path).sub(/#{load_path}\/?/, '') app.routes.controller_namespaces << namespace unless namespace.empty? end |