How do I set up a route in rails?
Posted
by NotDan
on Stack Overflow
See other posts from Stack Overflow
or by NotDan
Published on 2010-04-11T23:24:07Z
Indexed on
2010/04/11
23:33 UTC
Read the original article
Hit count: 250
ruby-on-rails
|routing
In my routes.rb I have this:
map.namespace :admin do |admin|
admin.resources :galleries do |galleries|
galleries.resources :gallery_images, :as=>'images'
end
end
rake routes shows the route created like this:
admin_gallery GET /admin/galleries/:id
and when I go to this url in my browser:
http://192.168.2.2:3000/admin/galleries/11/
I get this error:
Unknown action
No action responded to 11
But I would have expected it to use the show action/view, what am I doing wrong?
© Stack Overflow or respective owner