开发者

Adding an ID or Class in Ruby on Rails?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜