开发者

Ruby on Rails ERB Question

I have a question with turning this html into erb.

<button name="support" type="button" value="Get Support" class="brightOrange">
<span>Get Support</span>
</button>

I've been trying to do something like this in rails.

<% form_tag get_support_path do %> 
    <%= text_field_tag :email, "Email:" %>
    <% submit_tag "Join", :class=>"brightOrang开发者_开发百科e" %>
<% end %> 

Thanks for the help in advance. Not quite sure how to do this.


It looks like you want to do:

<%= button_to "Get support", "#", :class => 'brightOrange' %>

Other than that, you are missing an '=' in

<%= submit_tag "Join", :class=>"brightOrange" %>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜