我有一个属于 high_school 的嵌套模型学生。问题是当我去创建一个新学生(/high_schools/1/students/new)时,我收到了这个错误:
No route matches {:action=>"destroy", :controller=>"students", :high_school_id=> # <HighSchool id: 1, name: "cool place", ... }
<%= form_for @student, :url => high_school_student_path(@high_school, @student), :html => { :multipart => true } do |f| %>
我想我只是在做一些我想不到的非常简单和愚蠢的事情。
我的环境:Rails3 和 Ruby1.9.2dev
谢谢!