I have a view partial that is used to render a small block of HTML
content. Because of where it’s going to be placed in the HTML, it’s
important that it not begin or end with any HTML whitespace.
But making a sample view partial that contains nothing but a simple
string, just to test things out – when rendered it seems to still end
with a newline, which is of course HTML whitespace. Even though there’s
no newline in the html.erb file.
Is there any simple way to make a partial view render with no newline at
the end – or the more general question, what I’m really after, with no
HTML whitespace at the start or end of the partial view content?
Thanks for any advice.