is it possible to add html-content inside a link_to helper in HAML?
i tried this, but all i get is a syntax error:
= link_to \"Other page\", \"path/t
The simplest way to do it is by using html_safe or raw functions
= link_to 'Other Page'.html_safe, "path/to/page.html"
or using raw function (recommended)
= link_to raw('Other Page'), "path/to/page.html"
Simple as it can get !!
Don’t use html_safe method unless you’re sure your string isn’t nil. Instead use the raw() method, which wont raise an exception on nil.