-1

私は患者のパスにリダイレクトしようとしました:

format.html { redirect_to patient_path(patient_id), notice: 'Patient was successfully created.' }

しかし、どういうわけかこれは機能しません。エラーが発生します:

undefined local variable or method `patient_id' for #<DiagnosisController:0x33bea70>

{"utf8"=>"✓",
"authenticity_token"=>"DH+EXLBAd7bmEE4ahTPPz9GATUMoxrR0RZ5dB4pBtGc=",
"diagnosis"=>{"sicherheit"=>"Z",
"seite"=>"R",
"typ"=>"db",
"beschreibung"=>" Leberabszess durch Amöben",
"code"=>"A06.4",
"patient_id"=>"1"},
"commit"=>"Diagnose erstellen"}

だから、どのように私のパラメーターに患者の ID => 1 があるかを確認できます! では、何が問題なのですか?

4

1 に答える 1