I\'m implementing Schema microformats on a Ruby project using HAML and can\'t figure out how to set an empty attribute on a tag. I tried nil and false, but they simply do no
The accepted answer works, but it produces an HTML attribute with value.
If you want the attribute only to be output on HTML, without value, you can use the HTML-style attributes syntax of HAML:
%div(itemscope)