title: Rails 3 vs Rails 2 "wild controller" routing
body: <p>I'm trying to get my Rails 3 project to automatically resolve namespaced controllers, similar to the Rails 2 behaviour. For example (Rails 2):</p>
  
  <pre><code>$ rails pathtest &amp;&amp; cd pathtest
  $ script/generate controller First
  $ script/generate controller first/second
  $ script/generate controller first/second/third
  $ script/server
  </code></pre>
  
  <p>Requests to:</p>
  
  <p><li><strong>/first</strong> routes to first controller
  <li><strong>/first/second</strong> routes to second controller
  <li><strong>/first/second/third</strong> routes to third controller</p>
  
  <p>But, Rails 3 yields different routing using the 'wild controllers' path.</p>
  
  <pre><code>$ rails new pathtest &amp;&amp; cd pathtest
  $ rails generate controller First
  $ rails generate controller first/second
  $ rails generate controller first/second/third
  
  ## config/routes.rb
  Pathtest::Application.routes.draw do
    match ':controller(/:action(/:id(.:format)))'
  end
  
  $ rails server
  </code></pre>
  
  <p>Requests to:</p>
  
  <p><li><strong>/first</strong> routes to first controller
  <li><strong>/first/second</strong> routes to first#second
  <li><strong>/first/second/third</strong> routes to first#second :id => 'third'</p>
  
  <p>I'm starting to think that kind of automatic resolution of namespaced controllers isn't the way anymore? Has anyone found a way to automatically resolve namespaced controllers like this?</p>
  
  <p>Thanks!</p>