Has anyone written helpers that accept blocks of haml?  I've got the
following code that I'd like to turn into helpers

  .sub_section
    .top
      %h2= pluralize(@collection_count, 'Project')
      = "(Showing [email protected]})" if @collection_count > 10
    .bottom
      View by: Name | Creation Date

I'd envision the code being converted to something like this and then
writing three methods: sub_section, top, bottom that accept a haml
block.  How could I write those helpers?

  =sub_section do
    =top do
      %h2= pluralize(@collection_count, 'Project')
      = "(Showing [email protected]})" if @collection_count > 10
    =bottom do
      View by: Name | Creation Date
--~--~---------~--~----~------------~-------~--~----~
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