Somewhat stabbing in the dark here, but I would probably put something
like this in the extension's activate method;

Page.send(:include, HamlHack::PagePartExtensions)

And in lib/haml_hack/page_extensions.rb:

module HamlHack::PageExtensions
  def self.included(base)
    base.class_eval do
      alias_method_chain :parse_object, :haml_hack
    end
  end

  def parse_object_with_haml_hack(name)
    do stuff
  end
end


Have a look at page.rb, esp. the 'parse_object' method.

On Aug 28, 6:33 pm, Jordon Bedwell <envyge...@gmail.com> wrote:
> Is there a class we can tap into with extensions to parse a page just
> before write? Somebody wanted the HAML plugin fixed because he ran
> into a gotcha with the system and HAML where HAML complains about page
> parts and improper nesting so I wanted to get this fixed for him but
> have no idea what class I should tap into to do that.

Reply via email to