我为搜索表单提供了以下代码,但是如何在提交按钮中添加ID或类?
<% form_tag '/wine/search/', :method => 'get' do %>
<%= label_tag "Search" %>
<%= text_field_tag :search_string, params[:search_string] %>
<%= submit_tag "Go" %>
<% end %>
由于
答案 0 :(得分:21)
submit_tag "Go", :class => "some_class"
submit_tag "Go", :id=> "some_id"