错误提示 Filter chain halted as... rendered_or_redirected.
大家好
这两天刚开始学ruby 想运行网上的简单的冽子
配置好运行 添加,修改 没问题 到删除就不好用了(ruby 1.8.6,Rails 2.3.5,Aptana RadRails)
代码有点多 所以直接帖网址了
如: http://blog.csdn.net/kunshan_shenbin/archive/2008/04/09/2267871.aspx
我在 _post.rthml 页面添加了 删除功能!
<small>
<%= post.created_at.to_s(:long) %>
(<%= link_to 'Edit', :action => 'edit', :id => post %>)
(
<%= link_to 'Delete', :action =>'destroy', :id=> post %>)
</small>
请大家指点一下 谢谢
===============================================================================================================
Processing BlogController#destroy (for 127.0.0.1 at 2009-12-17 10:57:55) [GET]
Parameters: {"id"=>"8"}
Redirected to http://127.0.0.1:3004/blog/list
Filter chain halted as [#<Proc:0x035bb80c@C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/verification.rb:82>] rendered_or_redirected.
Completed in 0ms (DB: 0) | 302 Found [http://127.0.0.1/blog/destroy/8]
[解决办法]
改为这个试试:<%= link_to '删除', post, :confirm => 'Are you sure?', :method => :delete %>