Wrong route generation using namespace

Posted by Plume on Stack Overflow See other posts from Stack Overflow or by Plume
Published on 2010-05-06T11:57:45Z Indexed on 2010/05/06 12:28 UTC
Read the original article Hit count: 167

Filed under:
|
|

Hi people!

I am building an administration space in my web application. To do this, I am using namespaces but even if the rake generated routes are ok, when i follow the root of my admin space I get an error:

Routing Error
No route matches "/guru"

My routes.rb :

Baies::Application.routes.draw do |map|
  resources :fights
  resources :actions
  resources :users

  namespace :guru do
    root :to => "guru#index"
    resources :users
  end

  root :to => "public#index"
end

My arbo:

.
`-- app
   `-- controllers
      |-- actions_controller.rb
      |-- application_controller.rb
      |-- fights_controller.rb
      |-- guru
      |   |-- guru_controller.rb
      |   `-- users_controller.rb
      |-- public_controller.rb
      `-- users_controller.rb

For information, the routes /guru/users works :)

Thanks for help!

@tchaOo°

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about namespaces