Sha256: 06a3130dd201fa1f5a563df6c25002fbe38bd2bb4e6e5e216eec1a8be98506ef

Contents?: true

Size: 440 Bytes

Versions: 9

Compression:

Stored size: 440 Bytes

Contents

module Haml
  class SafeErubisTemplate < Tilt::ErubisTemplate

    def initialize_engine
    end

    def prepare
      @options.merge! :engine_class => ActionView::Template::Handlers::Erubis
      super
    end

    def precompiled_preamble(locals)
      [super, "@output_buffer = output_buffer ||= nil || ActionView::OutputBuffer.new;"]
    end

    def precompiled_postamble(locals)
      [super, '@output_buffer.to_s']
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
haml-4.0.1 lib/haml/helpers/safe_erubis_template.rb
haml-4.0.1.rc.1 lib/haml/helpers/safe_erubis_template.rb
haml-4.0.0 lib/haml/helpers/safe_erubis_template.rb
haml-4.0.0.rc.1 lib/haml/helpers/safe_erubis_template.rb
haml-3.2.0.rc.4 lib/haml/helpers/safe_erubis_template.rb
haml-3.2.0.rc.3 lib/haml/helpers/safe_erubis_template.rb
haml-3.2.0.rc.2 lib/haml/helpers/safe_erubis_template.rb
haml-3.2.0.rc.1 lib/haml/helpers/safe_erubis_template.rb
haml-3.2.0.beta.3 lib/haml/helpers/safe_erubis_template.rb