Module: Cell::Slim

Includes:
Rails
Defined in:
lib/cell/slim.rb,
lib/cell/slim/version.rb

Defined Under Namespace

Modules: Rails

Constant Summary collapse

VERSION =
"0.0.4"

Instance Method Summary collapse

Methods included from Rails

included

Instance Method Details

#render_templateObject


6
7
8
9
10
11
# File 'lib/cell/slim.rb', line 6

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

#template_options_for(options) ⇒ Object


13
14
15
16
17
18
19
20
21
22
# File 'lib/cell/slim.rb', line 13

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