Sha256: e24ff3b2bc7879785132cf429864f8696e64bfa394182212c13c715b43e6a4b8
Contents?: true
Size: 902 Bytes
Versions: 13
Compression:
Stored size: 902 Bytes
Contents
module ActionView module TemplateRendererPatch def self.included base base.class_eval do alias_method :original_render, :render def render(context, options) @view = context @details = extract_details(options) extract_format(options[:file] || options[:template], @details) template = determine_template(options) context = @lookup_context unless context.rendered_format context.formats = template.formats unless template.formats.empty? context.rendered_format = context.formats.first end layout = template.layout if template.respond_to?(:layout) layout ||= options[:layout] render_template(template, layout, options[:locals]) end end end end end ActionView::TemplateRenderer.send(:include, ActionView::TemplateRendererPatch)
Version data entries
13 entries across 13 versions & 1 rubygems