views:

41

answers:

1

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=>"brightOrange" %>
<% end %> 

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

A: 

Try this:

button_to "Get Support", {:action => 'support/get'}.

you can give HTML options also.

See following links for more details

sameera207
How would you put in the <span> though with the method?
RoR
:action => 'support/get' , What does this mean? Since there is no action called support/get, does this just go directly to the URL of suppor/get?
RoR
Hi ROR, yes, support/get is the support controllers get action. (Its not RESUFuly though). why you need a <span>Get Support</span> ??
sameera207