在rails 4中处理Link_to_remote

时间:2016-07-21 07:22:14

标签: ruby-on-rails ruby ruby-on-rails-4 ruby-on-rails-3.2

如何处理rails4中的link_to_remote

= link_to_remote("Remove ", :url => {:controller => 'task', :action => "remov"},
:confirm => "Remove Force Result Notes \nAre you sure you want to remove Force Result Notes from selected task allocation(s)?", :method => :post, :with => "'selected_ta=' + $$('.select_box:checked').map(function(e) { return e.value; }).join()",
:after => 'Waiting.saving();', :complete => 'Waiting.hide();',
:failure => "alert('faill!!!')",
:html => {:title => "Remove Notes"})

我很难处理,之后和完成。我也阅读了很多文章,但没有找到帮助。

1 个答案:

答案 0 :(得分:0)

如果你想要执行或渲染任何逻辑,它应该在控制器中,你可以使用flash messages来实现这些目的。