Skip to content

Commit

Permalink
Merge pull request #35627 from Futurelearn/seb-rename-view-run-method
Browse files Browse the repository at this point in the history
Rename `ActionView::Base#run`
  • Loading branch information
tenderlove committed Mar 15, 2019
2 parents 1cdc6c6 + 47fea39 commit 905018f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion actionview/lib/action_view/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def initialize(lookup_context = nil, assigns = {}, controller = nil, formats = N
_prepare_context
end

def run(method, template, locals, buffer, &block)
def _run(method, template, locals, buffer, &block)
_old_output_buffer, _old_virtual_path, _old_template = @output_buffer, @virtual_path, @current_template
@current_template = template
@output_buffer = buffer
Expand Down
2 changes: 1 addition & 1 deletion actionview/lib/action_view/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def supports_streaming?
def render(view, locals, buffer = ActionView::OutputBuffer.new, &block)
instrument_render_template do
compile!(view)
view.run(method_name, self, locals, buffer, &block)
view._run(method_name, self, locals, buffer, &block)
end
rescue => e
handle_render_error(view, e)
Expand Down
2 changes: 1 addition & 1 deletion actionview/lib/action_view/template/handlers/erb/erubi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def evaluate(action_view_erb_handler_context)
include action_view_erb_handler_context._routes.url_helpers
class_eval("define_method(:_template) { |local_assigns, output_buffer| #{src} }", @filename || "(erubi)", 0)
}.empty
view.run(:_template, nil, {}, ActionView::OutputBuffer.new)
view._run(:_template, nil, {}, ActionView::OutputBuffer.new)
end

private
Expand Down

0 comments on commit 905018f

Please sign in to comment.