2011-01-09 43 views
0

我可以在我的控制檯上運行此命令:的Rails 3:路徑鑑於沒有響應,但在控制檯的工作

@user.relationships.find_by_followed_id(9) 

但我不能對我的看法使用:

<%= form_for current_user.relationships.find_by_followed_id(9), :html => { :method => :delete } do |f| %> 

的錯誤是:

undefined method `relationship_path' for #<#<Class:0x00000100bdc008>:0x00000100bc1f50> 

我不明白爲什麼。

回答

0

你沒有爲你的關係資源/模型定義的路線...

+0

是的,我已經在寫作之前就已經想通了。太愚蠢了......我花了60分鐘才弄明白。我以爲路線在那裏。謝謝。 – donald 2011-01-09 11:44:46

相關問題