2016-07-20 3 views
0

제출 버튼에 disable_with를 사용하고 있는데, Rails 3.2에서는 정상적으로 작동하지만 Rails 4.2.6에서는 작동하지 않습니다. 이 내가 disable_with을 사용하고 내 양식이다disable_with Rails 4.2.6에서 작동하지 않습니다.

<%= semantic_form_for(@account, :url => account_create_path, :html => { :multipart => true, :class => 'acc_create'}) do |f| %> 
    <%= u.input :name, :input_html => {:placeholder => "Name", :value => @account.user.name} %> 
    <%= u.input :email, :input_html => {:placeholder => "Email", :value => @account.user.email} %> 
    <%= f.buttons do %> 
    <%= f.commit_button :label => 'Create My Account', :button_html => {:class => 'register button', :disable_with => 'Wait...', :id => 'user_submit'} %> 
    <% end %> 
<% end %> 

도와주세요.

답변

1

이 시도하십시오 기본 양식 빌더 아니다 .

0

각각 생성 된 html을 공유 할 수 있습니까? disable_with 레일이나 의미 형식의 일부입니까? 당신이

<%= f.commit_button "Create", :button_html => {:class => "btn primary", :disable_with => 'Processing...'} %> 
0

이 작동합니다 : 그것은

0
<%= f.submit 'Start Your Membership', :class => 'button', :data => {:disable_with => 'Please Wait...'} %> 

또한 당신은 당신의 응용 프로그램에 JQuery와 및 JQuery와 - UJS 자바 스크립트를 추가 할 필요가에 대한

<%= f.commit_button :label => 'Create My Account', :button_html => {:class => 'register button', 'data-disable-with' => 'Wait...', :id => 'user_submit'} %> 
관련 문제