但我想它匹配[POST] “/ student_tests/1 /上传”没有路由匹配[POST] “/student_tests/upload.1”
在我已经添加
resources :student_tests do
member do
post 'upload'
end
end
的routes.rb中
在我添加了一些
def upload
render :upload
end
在student_test
<%= link_to "| Upload Scaled Scores", upload_student_test_path(test), method: :edit%>
索引页面的students_test_controller
这里测试的student_test
的目的是通过使用机架式路线
upload_student_test POST /student_tests/:id/upload(.:format) student_tests#upload
。我在什么错误,其“/student_tests/upload.1”搜索我希望它寻找“/ student_tests/1 /上传”(在这里是1是学生的考试的id)
你能粘贴你用来生成超级引用的link_to代码吗? –