summaryrefslogtreecommitdiff
path: root/config/initializers/hamlit.rb
blob: 51dbffeda05030a8b79248241e3ffe92fe4f0057 (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')