This project is archived and is in readonly mode.
Rails 3.0b3 and 3.0b4: :as option in resource router fails
Reported by Bob Lail | June 9th, 2010 @ 07:35 PM
In Rails 2.3.5,
- create an app
./script/generate scaffold Post title:string body:string
- In routes.rb, add
:as => :widgets
tomap.resources :posts
- http://localhost:3000/widgets shows your resource
In Rails 3.0b4 (and b3),
- create an app
rails g scaffold Post title:string body:string
- In routes.rb, add
:as => :widgets
tomap.resources :posts
- http://localhost:3000/widgets throws a RoutingError
Comments and changes to this ticket
-
Neeraj Singh June 10th, 2010 @ 07:16 PM
In rails3 :as option can be used to map to a different controller.
resources :photos, :as => "images"
Now /photos will map to images_path
The option you are looking for is :path.
resources :posts, :path => :widgets
-
Rohit Arondekar June 11th, 2010 @ 10:43 AM
- Assigned user set to Santiago Pastorino
-
Ryan Bigg June 12th, 2010 @ 02:54 AM
- State changed from new to invalid
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>