# This file makes Haml work with Rails
# using the > 2.0.1 template handler API.

module Haml
  class Template
    def self.line_offset
      1
    end

    def initialize(view)
      @view = view
    end

    def compile(template)
      options = Haml::Template.options.dup
      Haml::Engine.new(template, options).send(:precompiled_with_ambles, [])
    end
  end
end

ActionView::Base.register_template_handler(:haml, Haml::Template)

# :stopdoc:
# This file makes Haml work with Rails
# using the > 2.0.1 template handler API.

module Haml
  class Template
    def self.line_offset
      1
    end

    def initialize(view)
      @view = view
    end

    def compile(template)
      options = Haml::Template.options.dup
      Haml::Engine.new(template, options).send(:precompiled_with_ambles, [])
    end
  end
end

ActionView::Base.register_template_handler(:haml, Haml::Template)
# :startdoc:

Make sure that the proper Haml module docs show up in the RDoc.
Make sure that the proper Haml module docs show up in the RDoc.

git-svn-id: 4f3887ee22fa92c7515d4a1b1e550bc0e860970c@723 7063305b-7217-0410-af8c-cdc13e5119b9
