:pauls.methods' has an useful idea on extending enumerable to support
an else if it's empty :

http://blog.sponagl.de/2009/1/23/alternative-block-execution-on-empty-enumerable

Essentially in ERB it allows :

<% results.each do |x| %>
  <li>hit:<%=x-%></li>
<% end.else do %>
  <li>no hits found</li>
<% end %>

Is there any way to call this in 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