Class: Cmsimple::TemplateResponder

Inherits:
ActionController::Responder
  • Object
show all
Defined in:
lib/cmsimple/template_responder.rb

Instance Method Summary collapse

Instance Method Details

#default_renderObject



3
4
5
6
7
8
9
10
# File 'lib/cmsimple/template_responder.rb', line 3

def default_render
  if controller.action_name == 'show'
    template = File.join Cmsimple.configuration.template_path, (@resource.template.presence || 'default')
    controller.render template, @resource.template_render_options
  else
    super
  end
end