Question

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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top