Вопрос

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

Это было полезно?

Решение

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top