Sha256: a6131be893cff9c947a33698be4a6edec1bab0a9302fbb1090c022fdae74e48b

Contents?: true

Size: 543 Bytes

Versions: 1

Compression:

Stored size: 543 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
  end

  class ViewModelSlim < ViewModel
    include Cell::Slim
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cells-slim-0.1.1 lib/cell/slim.rb