刚把自己的rails app升级到rails 2.0版本。
发现 destroy method 不好用了。
程序上没有什么特殊的,就是普通的destroy method.
[code]
def destroy
Recipe.find(params[:id]).destroy
redirect_to :action => 'list'
end
[/code]
数据不被删除,然后转到了list action。
log 里面有这样一行。
[code]
Filter chain halted as [#<ActionController::Filters::ClassMethods::ProcFilter:0xb6b60ed4 @filter=#<Proc:0xb6d012e8@/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/verification.rb:75>>] rendered_or_redirected.
[/code]
在网上查了查,[url]http://www.oreillynet.com/cs/user/view/cs_msg/92284[/url]跟我的情况一样。
但是我的firefox 已经 enable javascript了。
而且我在IE 7上也测试了,还是不行。
郁闷。
我把destroy 改成 delete 或者其他的名字。
就好使了。
那个filter chain是个什么东东呢?
请教一下,这是不是一个rails bug.该怎么处理啊。
谢谢
发现 destroy method 不好用了。
程序上没有什么特殊的,就是普通的destroy method.
[code]
def destroy
Recipe.find(params[:id]).destroy
redirect_to :action => 'list'
end
[/code]
数据不被删除,然后转到了list action。
log 里面有这样一行。
[code]
Filter chain halted as [#<ActionController::Filters::ClassMethods::ProcFilter:0xb6b60ed4 @filter=#<Proc:0xb6d012e8@/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/verification.rb:75>>] rendered_or_redirected.
[/code]
在网上查了查,[url]http://www.oreillynet.com/cs/user/view/cs_msg/92284[/url]跟我的情况一样。
但是我的firefox 已经 enable javascript了。
而且我在IE 7上也测试了,还是不行。
郁闷。
我把destroy 改成 delete 或者其他的名字。
就好使了。
那个filter chain是个什么东东呢?
请教一下,这是不是一个rails bug.该怎么处理啊。
谢谢
升级至Rails2.0后,发现destroymethod无法正常工作。数据未被删除且转向listaction。将destroy方法重命名为delete后问题解决。
171

被折叠的 条评论
为什么被折叠?



