我创建了这样的嵌套路由
resources :subjects do
resources :subject_edits do
member do
post :vote
end
end
end
当我运行时rake routes
,我发现它退出了
vote_subject_subject_edit POST /subjects/:subject_id/subject_edits/:id/vote(.:format) subject_edits#vote
但是当我在我的 .erb 文件中使用它时
<%= button_to 'I Agree', :action => vote_subject_subject_edit_path(@subject, @edit) %>
我有一个错误,
没有路线匹配 {:action=>"/subjects/25/subject_edits/1/vote", :subject_id=>"25", :id=>"1", :controller=>"subject_edits"}
这里有什么问题?