I am new to Haml (as of yesterday), but am very much enjoying it. I
have converted almost an entire rails project, but I am stuck on a
couple of my helpers which I would like to convert to use the nicely
indented output of Haml.

As an example, I have the following helper for displaying flash
messages:

  def flash_messages
    flash.each do |key,value|
      haml_tag :div, { :id => "flash_#{key}" } do
        haml_concat value
      end
    end
  end

This is working provided that in my views I call it as

  - flash_messages

I feel like this should really be

 = flash_messages

to be consistent with Rails conventions and the way I interpret views.
I have tried a half-dozen variations to achieve this, but none seem to
work. Any suggestions are appreciated as I have many of these and I
only want to use the "silent" syntax on helpers that have blocks
associated with them. The rest I would like to use the "=".

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