mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
18 lines
489 B
Ruby
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
|