This project is archived and is in readonly mode.
"rails g controller" does not generate any routes
Reported by David Chelimsky | March 19th, 2010 @ 01:07 PM | in 3.0.2
The controller generator does not provide any
routes.
Steps to reproduce:
rails example
cd example
rails g controller things index
Now add the following test to test/functionals/things_controller_test.rb:
test "GET index" do
  get :index
end
Running this test produces:
  1) Error:
test_GETs_index(ThingsControllerTest):
ActionController::RoutingError: No route matches {:controller=>"things"}
This is because the generator does not provide any routes.
This is true of rails 3.0.0.beta and the current HEAD in git (0aa0c37b59077d3f8b0d43c4d5faf86d40949f5f).
Not sure if this matters, but: Running Ruby-1.8.7-p249 on mac os-x (snow leopard).
Comments and changes to this ticket
- 
        

Jeremy Kemper March 19th, 2010 @ 02:31 PM
- State changed from new to open
 - Assigned user set to José Valim
 - Milestone cleared.
 
 - 
        

Repository March 19th, 2010 @ 05:13 PM
- State changed from open to resolved
 
(from [562154fcbc8f36f94c986a3253c73ae88e2c1146]) Controller generator now creates routes as well [#4233 state:resolved] http://github.com/rails/rails/commit/562154fcbc8f36f94c986a3253c73a...
 - 
            
        

 - 
        

 
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Referenced by
- 
        
          4233 
          "rails g controller" does not generate any routes
        (from [562154fcbc8f36f94c986a3253c73ae88e2c1146])
Control...