不知道我缺少什麼。首先這是一個有效的路線,如果我手動導航到它...正確的link_to路線在Rails
/orientations/1/registrations
這顯示我與第一個orientaiton相關的所有註冊。現在我試圖在我看來創建一個link_to這些路線。這裏是耙路線的輸出...
http://pastie.org/pastes/8440065/text
在我看來,我試圖做...
<%= link_to "R", orientation_registration_path(orientation) %></li>
...和我得到的錯誤是...
No route matches
{
:action => "show",
:controller => "registrations",
:orientation_id => #<Orientation
id: 1,
class_date: "2013-10-17",
class_time: "11:30am",
seats: 30,
active: true,
created_at: "2013-10-28 14:22:42",
updated_at: "2013-10-28 14:22:42">
}
我錯過了什麼?
你知道了阿米特。我發誓我早些時候嘗試添加's',但它沒有奏效! – Lumbee
你也缺少路由參數! – sevenseacat