Hi,
I'm using the new HTML5 data-attributes feature in Haml 3. I'm using
it with a method that returns true or false and I'm experiencing some
unexpected results. When the data-attribute is true, the attribute
appears in my markup but has no value. When the method returns false,
the attribute doesn't appear in the markup at all. (Same for nil,
actually.)
This makes sense for cases like %input{:selected => true} resulting in
<input selected>, but in my data-attributes I need an actual true and
an actual false. I'm not sure how nil should be handled.
Do folks agree? Should true and false be expressed explicitly as
values for HTML5 data-attributes? Patch with failing tests:
http://github.com/akahn/haml/commit/f8fae6569a75b9782decee53511f7fa335dab69f
Cheers,
Alex
--
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/haml?hl=en.