See documentation:
<%= link_to "back", { controller: "welcome" }, :class => "btn test" %>
Pregunta
I am trying to create a link with two classes.
Code in my view looks like this:
<%= link_to "back", controller: "welcome", :class => "btn test" %>
And am expecting to have:
<a href="/welcome/index" class="btn primary">back</a>
But am getting:
<a href="/welcome/index?class=btn+test">back</a>
What is that am doing wrong?
Solución
See documentation:
<%= link_to "back", { controller: "welcome" }, :class => "btn test" %>