How to avoid additional spaces when rendering HTML
Many, many moons ago 🌕🌗🌑🌓🌕 before Rails 3, ERB would add additional spaces before and after rendering HTML content, using <% %>.
To avoid those additional spaces you can use <%- %> or <% -%>
I share this in case you were like me, checking out some older code and didn't know what was going on here.
Tweet