Module: Slimmer::Template::ClassMethods

Defined in:
lib/slimmer/template.rb

Instance Method Summary collapse

Instance Method Details

#slimmer_template(template_name) ⇒ Object

Set the template to use

Examples:


class MyController < ApplicationController
  include Slimmer::Template
  slimmer_template 'header_footer_only'
end

Parameters:

  • template_name (String)

    the template in static to use

See Also:


37
38
39
40
41
# File 'lib/slimmer/template.rb', line 37

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