Sha256: 88d385dbff58b9c0794ac6e100d91fb526319ecae24a797788c6a4751d3303cd
Contents?: true
Size: 782 Bytes
Versions: 10
Compression:
Stored size: 782 Bytes
Contents
module Edifice module Renderer def self.included(renderer) renderer.class_eval do def _template_renderer #:nodoc: @_template_renderer ||= Edifice::TemplateRenderer.new(@lookup_context) end end end end class TemplateRenderer < ActionView::TemplateRenderer def render_template(template, layout_name = nil, locals = {}) # ensure we aren't rendering e.g. text if template.respond_to?(:virtual_path) and @view.controller and @view.controller.respond_to?(:set_edifice_names) @view.controller.set_edifice_names(template.virtual_path.name, template.virtual_path.prefix, (layout_name.nil? ? '' : layout_name.split('/').last)) end super(template, layout_name, locals) end end end
Version data entries
10 entries across 10 versions & 1 rubygems