nanoc or ruby link_to questions
-
29-04-2021 - |
Frage
I have an href tag <li><a href="/"><span></span>Home</a></li>
Which i need to convert to <li> <%= link_to('Home', '/Home/') %></li>
But when I enter <span></span>
it reads an error. How do i enter <span></span>
. So that its the same as href tag above ? <span></span>
needs to be there as it is a css fix ?
thanks
Lösung
You can put the <span></span>
in your first argument, so link_to '<span></span>Home', '/'
should give you exactly what you want.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow