I have a string of html in a rails helper module:
def app_link
"<a href=\"https://itunes.apple.com/us/app/one-spark/id630800549?mt=8\" target=\"_blank\">
<img src=\"/assets/apple-download-button.png\" alt=\"App Store\" />
</a>"
end
When it renders normally it escapes the HTML, but when I add
<%= app_link.html_safe %>
The assets part of the image path is dropped and changed to:
<a href="https://itunes.apple.com/us/app/one-spark/id630800549?mt=8" target="_blank">
<img src="apple-download-button.png" alt="App Store" />
</a>
I'm guessing this has something to do with the asset pipeline but it seems like really bizarre behaviour.