由于rails3不再死绑prototype 一些之前默认会加载好的东西就需要自己来了 多次碰到no routes match问题都是因为rails.js没有加载 ……
今天加了一个新的js进来 顺便动了下js文件的顺序 就再次餐具了
再加一个
[b]rails.js一定要在jquery后面加载……[/b]
[b]rails form_for 配置导致的no routes match 问题[/b]
当对一个已保存的对象进行操作时
这样配置form_for 总会出现 no routes match错误
而这样配置则正常
问题弄清楚了
Ok when using an update action (object gave to form_for not empty). The method must be PUT instead of POST.
今天加了一个新的js进来 顺便动了下js文件的顺序 就再次餐具了
再加一个
[b]rails.js一定要在jquery后面加载……[/b]
[b]rails form_for 配置导致的no routes match 问题[/b]
当对一个已保存的对象进行操作时
这样配置form_for 总会出现 no routes match错误
form_for(@object, :url => other_operate_objects_path(@object)
而这样配置则正常
form_for(:object, @object, :url => other_operate_objects_path(@object)
问题弄清楚了
Ok when using an update action (object gave to form_for not empty). The method must be PUT instead of POST.