2011-01-23 6 views
0

체크 상자에 정보를 입력 한 후 정보를 제출하는 방법을 찾았습니다.체크 상자에 부분적으로 다시로드하십시오.

<% remote_form_for @object do |f| %> 
<%= f.check_box :state, :label => @object.state, :onchange => 
'this.form.onsubmit()'%> <%end%> 

나는보기를 업데이트하고 싶지만 도우미에게는 기회가 없다. 어떤 생각을 어떻게 활성화시킬 수 있습니까?

page[:patentencart].replace_html :partial => 'partial' 

답변

3

레일 3 응답 : 'this.form.submit()'

에서 'this.form.onsubmit()'

<%= form_for @object, :remote => true do |f| %> 
<%= f.check_box :state, :label => @object.state, :onchange => 'this.form.submit()'%> 
<%end%> 

변경

관련 문제