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.

When routing creates a singular resource, it doesn't add itself to name_prefix

#3817

Routing code:

resource :subscription do
  get :renew
  resources :cards
end

Generates these routes (irrelevant parts skipped):

              GET    /subscription/renew(.:format)          {:action=>"renew", :controller=>"subscriptions"}
              GET    /subscription/cards(.:format)          {:action=>"index", :controller=>"cards"}
        cards POST   /subscription/cards(.:format)          {:action=>"create", :controller=>"cards"}
     new_card GET    /subscription/cards/new(.:format)      {:action=>"new", :controller=>"cards"}
    edit_card GET    /subscription/cards/:id/edit(.:format) {:action=>"edit", :controller=>"cards"}

As you can see, there's no method for renew and cards methods aren't name prefixed.

Reported by Eugene Pimenov · January 30th, 2010 @ 08:17 AM

State: duplicate
Milestone: none
Assigned to: nobody
Importance: Low