What is the equivalent of <% debug @variable %> for Haml?
In Haml, to print a result on the page, you use =
sign, so in your case it is:
= @variable.inspect
To write a conditional statement, for instance if else
, you would use -
:
-if condition
# logic
-else
#logic
Note, there is no end
.