Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (26 sloc) 0.669 kB
# :stopdoc:
# This file makes Haml work with Rails
# using the > 2.0.1 template handler API.
module Haml
class Template
include ActionView::TemplateHandlers::Compilable if defined?(ActionView::TemplateHandlers::Compilable)
def self.line_offset
1
end
def compilable?
true
end
def line_offset
self.class.line_offset
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:
Jump to Line
Something went wrong with that request. Please try again.