Are you sure this patch is necessary with the latest stable branch? Mick wrote: > Hi, > Upon upgrading an app to Rails 2.2.2 and Haml 2.0.5 I found that my > custom FormBuilder was no longer working. Specifically I was getting > no html being output. If I used erb instead of haml, then my > FormBuilder worked. > > I found that if I change Haml::Helpers::capture_haml from: > > def capture_haml(*args, &block) > ... > block.call(*args) > captured = haml_buffer.buffer.slice!(position..-1) > > to > > def capture_haml(*args, &block) > ... > captured = block.call(*args) > haml_buffer.buffer.slice!(position..-1) > > then my FormBuilder seems to work. In the former case, the captured > variable was empty (due to position being equal to > haml_buffer.buffer.size), while in the latter case the captured > variable correctly contained the html to be captured. > > Is the above a sensible patch? This is the first time I have looked at > the haml code and so I could be way off the mark. > > thanks, > mick > > PS: thanks for haml. It really is terrific. > > > > >
--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
