This project is archived and is in readonly mode.
path_prefix doesn't work
Reported by DavidBackeus | February 25th, 2010 @ 01:09 PM | in 3.0.2
Using :path_prefix in resources routes doesn't seem to do anything in current edge rails (529d0f581276f9aad32432ef65421bc1a59b52e8). Though according to the routing guide it should.
Reproduce by...
rails my_app
cd my_app
script/rails g scaffold Movie title:string
edit config/routes.rb to:
resources :movies, :path_prefix => "/test"
rake routes
And notice how path_prefix has not been added to the routes.
Comments and changes to this ticket
-
José Valim March 3rd, 2010 @ 08:39 AM
- Assigned user set to josh
- Milestone cleared.
-
josh March 6th, 2010 @ 07:15 PM
- State changed from new to wontfix
Take a look at the scope method
scope "/test" do resources :movies end
-
Nathan L. Walls March 6th, 2010 @ 09:55 PM
I've tested with Joshua's scope example above, and that does have the desired effect. However, the routing documentation seems stale. The scope option is not mentioned, while :path_prefix still figures prominently in the documentation with :name_prefix.
Since this is a wontfix, code-wise, could the case address the documentation instead? If not, what's the best avenue for resolving the docs?
-
siong1987 March 6th, 2010 @ 10:13 PM
I opened a ticket on Rails Guides.
https://rails.lighthouseapp.com/projects/16213-rails-guides/tickets...
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>