开发者

Ruby on Rails ERB Question

开发者 https://www.devze.com 2023-01-17 13:35 出处:网络
I have a question with turning this html into erb. <button name=\"support\" type=\"button\" value=\"Get Support\" class=\"brightOrange\">

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

精彩评论

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