Module: Slimmer::Template

Defined in:
lib/slimmer/template.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#slimmer_template(template_name) ⇒ Object

Set the template to use

Examples:


class MyController < ApplicationController
  include Slimmer::Template

  def index
    slimmer_template 'header_footer_only'
  end
end

Parameters:

  • template_name (String)

    the template in static to use

See Also:


22
23
24
# File 'lib/slimmer/template.rb', line 22

def slimmer_template(template_name)
  response.headers[Slimmer::Headers::TEMPLATE_HEADER] = template_name.to_s
end