What does <<-CONSTANT do?
Solution 1:
It's a heredoc.
http://en.wikipedia.org/wiki/Here_document#Ruby
Solution 2:
That's a here document. Basically, it's a multi-line string literal.
On lines after the line with the <<-HTML
, those are literal strings concatenated by newlines-- until the end marker is reached, which in this case is HTML
.