Skip to content

Instantly share code, notes, and snippets.

@advorak
Created June 14, 2013 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save advorak/5780718 to your computer and use it in GitHub Desktop.
Save advorak/5780718 to your computer and use it in GitHub Desktop.
def view
@ibs = <<-EOF
this is a test
testing
1 2 3
4 5 6
EOF
#=> "this is a test\ntesting\n\n1 2 3\n 4 5 6"
end
= form_tag briefing_briefing_sheet do
= hidden_field_tag :ibs, @ibs
= submit_tag
-#
In the above, the :ibs hidden_field_tag represents the value as:
"this is a test\n testing\n\n 1 2 3\n 4 5 6"
^^ ^^ ^^ --notice the extra indentation, which
--effectively changes the value of the :ibs hidden_field..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment