video的show页面,有个question的form(此question已经存在), 我f.submit应该到questions#update action,对不对,为什么总是提示 not route for post “videos/345” ,先谢谢了
如果jquery-ujs没生效的话也会造成这个问题,看看Gemfile里面有没有这个gem,以及application.js里面有没有require jquery-ujs(在require jquery下面)
执行你的rake routes,让我们看下你的routes分配,同时,如果是update,请求不是post,是put。PS,请提供你包含这个form的view文件的原始代码,这样可以更快的找到问题所在
question跟video的association是什么...
update 应该用 patch 而不是 post