Hi.  Newbie alert (apologies!)

 I'm really loving haml but very frequently finding starting with:

%div= foo.subject

and then not liking the empty html elements when there is no subject,
so I dutifully improve the output with:

- unless foo.subject.blank?
  %div= foo.subject

I'm wondering if there is a shorthand for this (common?) usage in
haml?  I guess what I'd love to see is something like:

%div=? foo.subject (and %div!=? etc.)

which would mean "only emit the html if the expression evaluates to a
non-blank value"

Is there some fantastic way to achieve this with released haml?



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to