开发者

Adding an ID or Class in Ruby on Rails?

开发者 https://www.devze.com 2022-12-23 23:13 出处:网络
I\'ve got the following code for a search form, but how would I add an ID or a class to the submit button?

I've got the following code for a search form, but how would I add an ID or a class to the submit button?

<% form_tag '/wine/search/', :method => 'get' do %>
    <%= label_tag "Search" %>
    <%= text_field_tag :search_string, params[:search_string] %>
    <%= submit_tag "Go" %>
<%开发者_JAVA百科 end %>

Thanks


submit_tag "Go", :class => "some_class"
submit_tag "Go", :id=> "some_id"

From the Rails API FormTagHelper

0

精彩评论

暂无评论...
验证码 换一张
取 消