What output are you looking for and what are you getting?

scott wrote:
> haml is installed as a plugin and *.haml files render correctly. rails
> version is 2.2.2
>
> i have this in my application helper and would like to convert the
> concat("<ul>") and concat("<li>") to work nicely with haml. i have
> tried "open", "haml_concat", and "haml_tag". i couldn't get anything
> to work, they all raised errors probably because i couldn't figure out
> the correct syntax or something. anyone have any suggestions?
>
>   def display_tree(tree, parent_id=nil, &block)
>     concat("<ul>")
>     tree.each do |node|
>       if node.parent_id == parent_id
>         concat("<li>")
>         yield node
>         display_tree(tree, node.id) { |n| yield n } unless
> node.children.empty?
>         concat("</li>")
>       end
>     end
>     concat("</ul>")
>   end
>
> >
>
>   


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