Hi I got a noob question, I want to create the following HTML result:
<a href="/controller/action" class="button-big layer">TEXT<span class="arrow-big"></span></a>
In the above HTML I want to have text with a span-class to style in an image via css.
When I try the following implementations the result reflects just one part of the needed implementation:
<%= link_to "TEXT", controller_path, :class => "button-big layer" %>
results in:
<a href="/controller/action" class="button-big layer">TEXT</a>
and
<%= link_to(content_tag(:span, "", :class => "arrow-big"), controller_path, :class => "button-big layer") %>
results in:
<a href="/controller/action" class="button-big layer"><span class="arrow-big"></span></a>
Does anyone know how to accomplish?
You could also nest tags by using alternative syntax for link_to helper
<%= link_to controller_path, :class=> "button-big layer" do %>
Text
<%= content_tag(:span, "", :class => "arrow_big" %>
<% end %>