【发布时间】:2016-07-20 06:22:40
【问题描述】:
我使用 disable_with 作为提交按钮,它在 Rails 3.2 中工作正常,但在 Rails 4.2.6 中不工作。 这是我使用 disable_with 的表单:
<%= 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 %>
请帮忙。
【问题讨论】: