1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00
haml--haml/lib/hamlit/rails_template.rb
2015-03-28 16:04:44 +09:00

18 lines
489 B
Ruby

require 'temple'
module Hamlit
RailsTemplate = Temple::Templates::Rails.create(
Hamlit::Engine,
generator: Temple::Generators::RailsOutputBuffer,
register_as: :haml,
escape_html: true,
streaming: true,
ugly: true,
)
ActiveSupport.on_load(:action_view) do
# Haml extends Haml::Helpers in action view each time.
# It costs much, so Hamlit includes a compatible module at first.
ActionView::Base.send :include, Hamlit::Helpers
end
end