What version are you using? In Haml 1.7.2, both empty and nil values result in a non-rendering attribute. I agree that empty values should render as empty attributes - this is the behavior in trunk.
I only use empty? on variables I know to be strings or arrays, for which it's defined in core. - Nathan Michiel de Mare wrote: > Oh, another thing - don't use "empty?" because it's defined for very > few objects outside rails. > > On Dec 11, 7:44 am, Michiel de Mare <[EMAIL PROTECTED]> wrote: > >> Attributes with nil or empty values cause an exception (in >> Haml::Engine#build_attributes at line 685, sorting an array with >> nils). >> >> Also, I think the intention of the code is to skip attributes with >> empty values, but that's definitely not desired - empty attribute >> values are often necessary. >> > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
