Hi,
I am adding a new action in UsersController, the name is "drag_demo".
But when I visit "http://localhost:3000/users/drag_demo", it show up the
error "Couldn't find User with ID=drag_demo"
I checked the routes. It seems the routes which created by map.resource
will cover the url "/users/drag_demo". If I move "map.connect
':controller/:action/:id'" to the top line in routes.rb, the problem
will be solved. But the other actions like "/users/1/edit" will not
availiable.
map.resources :users
....
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
Does anyone have ideas about that?
Thanks in advance
-Edwin
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment