RoR Path Helper link is backwards
I have a sentence model and set up in the routes.rb
map.resrouces :sentence
However, when I use edit_sentence_path(sentence) it sets up the url to be
/sentence/1/edit
instead of
/sentence/edit/1
Am I missing something? I am not exactly sure if I am doing this correctly since I am trying to do the data access stuff without using scf开发者_如何学编程fold, any help would be appreciated.
That is the correct URL when you use map.resources
rather than the :controller/:action/:id
convention when map.resources
is not used. So, you're doing it exactly right.
精彩评论