module ActionView
Public Instance Methods
_render_partial()
click to toggle source
If there's a way to call super instead of copypasta let me know. This works for both rails 4 and 5
# File lib/actionview/path_hints.rb, line 54 def _render_partial instrument(:partial) do |payload| view, locals, block = @view, @locals, @block object, as = @object, @variable if !block && (layout = @options[:layout]) layout = find_template(layout.to_s, @template_keys) end object = locals[as] if object.nil? # Respect object when object is false locals[as] = object if @has_object content = @template.render(view, locals) do |*name| view._layout_for(*name, &block) end content = layout.render(view, locals) { content } if layout content end end
path_hints()
click to toggle source
# File lib/actionview/path_hints.rb, line 48 def path_hints PathHints.new(@view, @template) end
render_partial()
click to toggle source
# File lib/actionview/path_hints.rb, line 42 def render_partial path_hints.apply(_render_partial) end