Domanda

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

È stato utile?

Soluzione

You can put the <span></span> in your first argument, so link_to '<span></span>Home', '/' should give you exactly what you want.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top