しかし、私はそれを[POST] "/ student_tests / 1/upload"と一致させたかったのです
IN私が追加したroutes.rb
resources :student_tests do
member do
post 'upload'
end
end
Student_test_controllerに追加しました
def upload
render :upload
end
student_testのインデックスページ
<%= link_to "| Upload Scaled Scores", upload_student_test_path(test), method: :edit%>
ここで、testはstudent_testのオブジェクトです。
ラックルートを使用する
upload_student_test POST /student_tests/:id/upload(.:format) student_tests#upload
「/student_tests/upload.1」の検索で「/student_tests/ 1 / upload」を検索するのはどのような間違いでしたか(ここで1は学生テストのIDです)