I just stumbled across this line in a HAML/Rails form:
~ f.input :content, label: false
What does the tilde do?
~
works just like=
, except that it runsHaml::Helpers#find_and_preserve
on its input. For example,
~ "Foo\n<pre>Bar\nBaz</pre>"
is the same as:
= find_and_preserve("Foo\n<pre>Bar\nBaz</pre>")
and is compiled to:
Foo <pre>Bar
Baz</pre>