Maintain style while taking link_to

Asked

Viewed 26 times

0

I’m having difficulty maintaining the style of a button by removing the link_to and keeping only raw:

=link_to(raw("<span class='calsse'></span>"), rota)

for:

=raw("<span class='calsse'></span>")

when I do this the button loses all style, just getting written "button" on the page.

  • Have you tried "<span class='classe'></span>".html_safe?

  • I just tried, it didn’t work out

  • The problem isn’t just the class name spelled wrong? (You wrote calsse).

  • Probably the style you want to keep is associated with the tag a in css. Ex: a .classe { ... }

1 answer

0


turned out I couldn’t take the link_to, so I just changed the route.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.