Results 1 to 3 of 3
Thread: Rails question about route
Nov 30, 2009, 02:36 #1
- Join Date
- Feb 2003
- 0 Post(s)
- 0 Thread(s)
Rails question about route
hello, When I'm learning the rails route system I find this problem.
First, I have all my controllers under the app folder, and I decide to move some of them to a admin under app so change the routes.rb like following
map.with_options(:namespace=>"admin") do |admin| admin.resources :instruments, :groups, :markets end
But when I point my mouse to those links (new, show, edit, destroy), I find a problem those generated links still pointed to the old location http://localhost:3000/groups
I use new_group_url method to generate links to create a new group.
<%= link_to "New Group", new_group_url %>
My question is what is the method that generate proper link url to my nested controllers (http://localhost:3000/admin/groups)?