简体   繁体   English

如何在Rails 3.1中使用带有遥控器的form_tag更新div

[英]How to update a div with form_tag with remote in rails 3.1

I have the following code 我有以下代码

<% form_tag  update_batting_order_tournament_path ,:complete => visual_effect(:appear, 'inning_update_success'), :method => :get, :remote => true do %>

basically I want to update a div 基本上我想更新一个div

Inning Order Updated! 客栈订单已更新!

This is not working as I have written. 如我所写,这不起作用。 Any ideas of what the correct option is 关于什么是正确选项的任何想法

Just use <%= instead of <%. 只需使用<%=而不是<%。

   <%= form_tag  update_batting_order_tournament_path ,:complete => visual_effect(:appear, 'inning_update_success'), :method => :get, :remote => true do %>

For more info refer to http://edgeguides.rubyonrails.org/3_0_release_notes.html#helpers-with-blocks 有关更多信息,请参阅http://edgeguides.rubyonrails.org/3_0_release_notes.html#helpers-with-blocks

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM