Sha256: 4cf630465b6008f8449812a4cb1c545688979ed56833d30d595c0184586ec265
Contents?: true
Size: 836 Bytes
Versions: 18
Compression:
Stored size: 836 Bytes
Contents
require 'temple' require 'hamlit/engine' require 'hamlit/rails_helpers' require 'hamlit/parser/haml_helpers' require 'hamlit/parser/haml_util' module Hamlit RailsTemplate = Temple::Templates::Rails.create( Hamlit::Engine, generator: Temple::Generators::RailsOutputBuffer, register_as: :haml, use_html_safe: true, streaming: true, ) # https://github.com/haml/haml/blob/4.0.7/lib/haml/template.rb module HamlHelpers require 'hamlit/parser/haml_xss_mods' include Hamlit::HamlHelpers::XssMods end module HamlUtil undef :rails_xss_safe? if defined? rails_xss_safe? def rails_xss_safe?; true; end end end # Haml extends Haml::Helpers in ActionView each time. # It costs much, so Hamlit includes a compatible module at first. ActionView::Base.send :include, Hamlit::RailsHelpers
Version data entries
18 entries across 18 versions & 1 rubygems