Created
June 14, 2013 09:49
-
-
Save advorak/5780718 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= 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