I just had to do this...

contents = if block_given?
  template.is_haml? ? template.capture_haml(&block) : template.capture
(&block)
end

...to get a Formtastic form builder to get nested form blocks to work
with HAML. The reason is probably that Formtastic form builder using
some nested procs (in compare to the original Rails form builder) that
HAML don't seem to like - but works perfectly with ERB, it's just Ruby
after all. But, why? Either we missed something, or HAML got a bug
(not into HAML internals, so can't really tell myself). If HAML need
special treatment (like in "our current case": capture_haml vs.
capture), it's breaking one of the most fundamental architecture
design principles, right? I assume it's a bug though. =)


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