【发布时间】:2013-11-20 19:56:51
【问题描述】:
所以我有一个bands 表、一个festivals 表和一个bands_festivals 表。我无法访问bands_festivals 表的显示页面。 这是我的路线文件:
Ejemplo::Application.routes.draw do
resources :bands_festivals
resources :festivals do
resources :band_festivals
end
resources :bands do
resources :band_festivals
end
按照其他人的建议,但我仍然收到以下错误:
没有路线匹配 {:action=>"show", :controller=>"band_festivals", :id=>#'}
如果你想看看我的控制器,他们在这里:The "create new entry" page on a many-to-many-relationship
【问题讨论】:
-
在出现该错误之前您在做什么?点击一个链接,我假设?如果是这样,
link_to标签是什么样的? -
我正在访问 localhost:3000/band_festivals。那是 band_festivals 表的索引页,它应该显示我为该表创建的所有条目
标签: ruby-on-rails ruby routes many-to-many nested-routes