This project is archived and is in readonly mode.

#4353 ✓resolved
ravinggenius

Router feature request

Reported by ravinggenius | April 9th, 2010 @ 05:39 AM

It would be super fantastic if a route option like :path_base...

MyApp::Application.routes.draw do |map|
  resources :nodes, :path_base => 'n'
end

...resulted in routes like...

          GET    /n(.:format)          {:controller=>"nodes", :action=>"index"}
    nodes POST   /n(.:format)          {:controller=>"nodes", :action=>"create"}
 new_node GET    /n/new(.:format)      {:controller=>"nodes", :action=>"new"}
          GET    /n/:id(.:format)      {:controller=>"nodes", :action=>"show"}
          PUT    /n/:id(.:format)      {:controller=>"nodes", :action=>"update"}
     node DELETE /n/:id(.:format)      {:controller=>"nodes", :action=>"destroy"}
edit_node GET    /n/:id/edit(.:format) {:controller=>"nodes", :action=>"edit"}

Is there currently a way to do this?

Comments and changes to this ticket

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

Tags

Pages