disable_with无法在表标记中工作?

时间:2013-04-12 13:38:39

标签: css ruby-on-rails-3.2

这是我的表格

   <table>
    <%= form_for Slot.new, :url => slots_path(@current_webclass), :validate => true, remote: true, :html => {:class => 'form-horizontal', id: 'slot-form', data: {type: "script", method: :post}} do |f| %>
    <tr>
      <td>
        <%= f.text_field :title %>
      </td>
      <td>
        <%= f.text_field :start_at, class: 'timepicker' %>
      </td>
      <td>
        <%= f.text_field :start_at, class: 'timepicker' %>
      </td>

      <td>
        <%= f.submit 'add', class: 'btn btn-success', disable_with: "process..." %>
      </td>
    </tr>
    <% end %>
   </table>

1 个答案:

答案 0 :(得分:0)

尝试将其用作符号button_tag "Checkout", :disable_with => "Please wait..."

如果不起作用,请尝试使用:

 'btn btn-success',disable_with =&gt; “进程......”}%&gt;