From 47fea39ed6b01b0f8c440f94e694519ec677ae4c Mon Sep 17 00:00:00 2001 From: Seb Jacobs Date: Wed, 13 Mar 2019 17:04:30 +0000 Subject: Rename `ActionView::Base#run` to `#_run` There was a recent change by @tenderlove to Action view which introduced `ActionView::Base#run` [1]. We ran into an issue with our application because one of the core concepts in our domain model is a `Run` which is exposed in most of our views as a helper method, which now conflicts with this new method. Although this is a public method it is not really meant to be part of the public API. In order to discourage public use of this method and to reduce the chances of this method conflicting with helper methods we can prefix this method with an underscore, renaming this method to `_run`. [1] https://github.com/rails/rails/commit/c740ebdaf5 --- actionview/lib/action_view/template/handlers/erb/erubi.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionview/lib/action_view/template/handlers') diff --git a/actionview/lib/action_view/template/handlers/erb/erubi.rb b/actionview/lib/action_view/template/handlers/erb/erubi.rb index 247b6d75d1..307b852440 100644 --- a/actionview/lib/action_view/template/handlers/erb/erubi.rb +++ b/actionview/lib/action_view/template/handlers/erb/erubi.rb @@ -27,7 +27,7 @@ module ActionView 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 -- cgit v1.2.3