軌產生支架控制器運動員的名字:字符串
軌產生示範單位...... sportler_id:整數
/app/controllers/sportlers_controller.rb
..
DEF add_einheit
運動員= Sportler.find(PARAMS [:ID])
@einheit = Einheit.new(:運動員=>運動員)
渲染:模板=> 「統一/編輯」
端
..
/app/views/sportles/index.html.erb - 當我切下面的路線錯誤
此源代碼doesnet出現了
...
<td><br>
<%= link_to "Trainingseinheit hinzufügen", :action => "add_einheit", :id => sportler %><br>
</td><br>
..
的routes.rb
FITAPP2 :: Application.routes.draw做
資源:型男
路由錯誤
沒有路由匹配{:動作=> 「add_einheit」:ID = groesse># 「3」,created_at: 「2012年12月27日15時56分04秒」,的updated_at: 「2012年12月27日15時56分04秒」>
:控制面板=>「運動員」}
嘗試運行耙路線可用路由的更多信息。
Jordie,我只是重新格式化你的整個文章,但隨後刪除的變化。 [瞭解StackOverflow風格的降價](http://stackoverflow.com/editing-help) –