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.

Namespace root route not really namespaced

#4351

This is similar in concept to this ticket: https://rails.lighthouseapp.com/projects/8994/tickets/3673-namespac...

I have this in config/routes.rb:

namespace :admin do
  root :to => "index#index"
end

But then rake routes shows:

admin_root        /admin                            {:controller=>"index", :action=>"index"}

And so it tries to map to IndexController rather than Admin::IndexController.

Reported by Ryan Bigg · April 8th, 2010 @ 11:14 PM

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

Activity

  1. Santiago Pastorino
    Santiago Pastorino
    • State changed from new to open
    • Tag changed from rails3 to actiondispatch, patch, rails3, routing
    • Assigned user set to josh
    • Milestone cleared.

    I've mailed Josh we are waiting what this kind of things

    namespace :account do
    match 'shorthand' end

    should do, DHH says that doesn't make sense so i deleted this from tests

    So i'm attaching a possible version of the patch.

    April 10th, 2010 @ 02:57 AM

  2. Santiago Pastorino
    Santiago Pastorino
    • State changed from open to wontfix

    the thing is :to overrides the namespace

    April 10th, 2010 @ 06:54 AM

  3. Ryan Bigg
    Ryan Bigg

    Thank you for the consideration and changes you have made today.

    April 10th, 2010 @ 06:55 AM

  4. Santiago Pastorino
    Santiago Pastorino
    • State changed from wontfix to open

    April 11th, 2010 @ 06:32 AM

  5. Santiago Pastorino
  6. Santiago Pastorino
    Santiago Pastorino
    • Assigned user changed from josh to José Valim

    April 11th, 2010 @ 08:50 AM

  7. Repository
    Repository
    • State changed from open to committed

    (from [5b89fd07b28bcd342f874ab08a03efd864db1340]) Make namespace work with options[:to] [#4351 state:committed]

    Signed-off-by: José Valim jose.valim@gmail.com
    http://github.com/rails/rails/commit/5b89fd07b28bcd342f874ab08a03ef...

    April 11th, 2010 @ 11:07 AM

  8. Jeremy Kemper