This project is archived and is in readonly mode.
RESTful routes don't take symbol for the :path option anymore
Reported by fabrik42 | August 5th, 2010 @ 11:08 AM | in 3.0.2
Hi,
as I to rails 3 rc from beta4 I recognized the following problem:
When you declare a route like this:
MyRailsApp::Application.routes.draw do |map|
resources :wiki_pages, :path => :pages do
..
end
end
- the rake routes task shows them correctly
- link_to does generate just a link to "/"
- navigation to /pages results in a ActionController::RoutingError
However, if you use a String instead of a Symbol to set the path, everything seems to work fine:
MyRailsApp::Application.routes.draw do |map|
resources :wiki_pages, :path => 'pages' do
..
end
end
Best,
Chris
Comments and changes to this ticket
-
fabrik42 August 5th, 2010 @ 11:09 AM
- Tag set to rails3 router, 3.0.0.rc
-
Andrew White August 20th, 2010 @ 08:35 AM
- Milestone cleared.
- State changed from new to open
- Assigned user set to José Valim
- Importance changed from to High
Attached patch fixes the problem.
-
Repository August 20th, 2010 @ 01:33 PM
- State changed from open to resolved
(from [c6391e6676d681554f62b43272e061372c06b833]) Allow symbols for :path resource(s) option [#5306 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/c6391e6676d681554f62b43272e061... -
Repository August 20th, 2010 @ 01:33 PM
(from [771d2f918fc87bdd4f83e6666fd816e9f0dcedfb]) Allow symbols for :path resource(s) option [#5306 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/771d2f918fc87bdd4f83e6666fd816...
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
Attachments
Tags
Referenced by
- 5306 RESTful routes don't take symbol for the :path option anymore (from [c6391e6676d681554f62b43272e061372c06b833]) Allow s...
- 5306 RESTful routes don't take symbol for the :path option anymore (from [771d2f918fc87bdd4f83e6666fd816e9f0dcedfb]) Allow s...