reload partial after clic a checkbox
I find a way to submit information after clic on a checkbox.
<% remote_form_for @object do |f| %>
<%= f.check_box :state, :label => @object.state, :onchange =>
'this.form.onsubmit()'%> <%end%>
I would like to update the view… but no chan开发者_如何学运维ce with the helpers. Any idea how to make it active ?
page[:patentencart].replace_html :partial => 'partial'
Rails 3 response :
<%= form_for @object, :remote => true do |f| %>
<%= f.check_box :state, :label => @object.state, :onchange => 'this.form.submit()'%>
<%end%>
Change 'this.form.onsubmit()' in 'this.form.submit()'
精彩评论