Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

"rails g controller" does not generate any routes

#4233

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).

Reported by David Chelimsky · March 19th, 2010 @ 01:07 PM

State: resolved
Milestone: 3.0.2
Assigned to: José Valim José Valim
Importance: none

Activity

  1. Jeremy Kemper
    Jeremy Kemper
    • State changed from new to open
    • Assigned user set to José Valim
    • Milestone cleared.

    March 19th, 2010 @ 02:31 PM

  2. Repository
  3. David Chelimsky
    David Chelimsky

    Thanks for the quick turnaround!

    March 19th, 2010 @ 06:16 PM

  4. Jeremy Kemper