summaryrefslogtreecommitdiff
path: root/config/initializers/hamlit.rb
blob: 7b545d8c06c6eea5e53597d11b9867c013df2c8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module Hamlit
  class TemplateHandler
    def call(template)
      Engine.new(
        generator: Temple::Generators::RailsOutputBuffer,
        attr_quote: '"',
      ).call(template.source)
    end
  end
end

ActionView::Template.register_template_handler(
  :haml,
  Hamlit::TemplateHandler.new,
)

Hamlit::Filters.remove_filter('coffee')
Hamlit::Filters.remove_filter('coffeescript')