Q:

writing HTML in ruby

Possible Duplicate:
What does “<<-” mean in Ruby? 

I saw this in devise_helper.rb
html = <<-HTML
<div> ... </div>
HTML

html.html_safe

what is this <<-HTML .. HTML notation?

A:

<< is the heredoc syntax. The minus (-) removes all whitespace before the end marker (HTML).

A:

It's called heredoc.
The variable will be ended at the HTML counterpart. But you can write any string to there.

