p Hello world
p = user.name
HTML div
s can be created by simply writing:
.foo Hello world
.foo = user.name
This creates a div with class foo.
.foo class=('special' if user.special?) Hello world
.foo class=(user.special? ? 'special' : 'not-special') Hello world
th colspan=4 = user.name
p data-bar=200
p data-bar="Hello #{user.name}"
- if foo
p Hello world
- else
p Bye Bye
= render 'path/to/partial'
javascript:
Foo.array_field = #{raw array};
Foo.json_field = #{hash.to_json.html_safe};
Foo.bar();
= mobiscroll("#user_date_of_birth", :date) do
| onChange: function(newDate, inst) {
| $('#payment_account_date_of_birth').val(newDate);
| }
/!
This is a
multiline comment
This is also a comment