Sha256: 0dcc18afd759730057aa617b9f25706dae228175fe07cc7dda27d04e2f6d6041

Contents?: true

Size: 593 Bytes

Versions: 3

Compression:

Stored size: 593 Bytes

Contents

require "slim"
require "cells"

module Cell
  module Slim
    def render_template(*)
      old_output_buffer = @output_buffer
      super
    ensure
      @output_buffer = old_output_buffer
    end

    def template_options_for(options)
      {
        template_class: ::Slim::Template,
        suffix:         "slim",
        disable_escape: true,
        escape_code:    false,
        use_html_safe:  false,
        buffer:         "@output_buffer"
      }
    end

    if Object.const_defined?(:ActionView)
      require "cell/slim/rails"
      include Cell::Slim::Rails
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cells-slim-0.0.6 lib/cell/slim.rb
cells-slim-0.0.5 lib/cell/slim.rb
cells-slim-0.0.4 lib/cell/slim.rb