aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2019-04-04 13:36:34 -0400
committerGitHub <noreply@github.com>2019-04-04 13:36:34 -0400
commit3809e3e5e9edc2fcc1eac2f8266ad1d24a754618 (patch)
tree836cd832e797d06e729c7ccb285375993c4c045b
parent50fba828d533ff75671ca8b83337dd99aa613ff7 (diff)
parentb2b2f70f1f81b54b799118e8a4feb601ab480c41 (diff)
downloadrails-3809e3e5e9edc2fcc1eac2f8266ad1d24a754618.tar.gz
rails-3809e3e5e9edc2fcc1eac2f8266ad1d24a754618.tar.bz2
rails-3809e3e5e9edc2fcc1eac2f8266ad1d24a754618.zip
Merge pull request #35858 from localhostdotdev/add-extensions-to-arity-error-message
Fix arity warning for template handlers
-rw-r--r--actionview/lib/action_view/template/handlers.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionview/lib/action_view/template/handlers.rb b/actionview/lib/action_view/template/handlers.rb
index ddaac7a100..6450513003 100644
--- a/actionview/lib/action_view/template/handlers.rb
+++ b/actionview/lib/action_view/template/handlers.rb
@@ -45,12 +45,12 @@ module ActionView #:nodoc:
unless params.find_all { |type, _| type == :req || type == :opt }.length >= 2
ActiveSupport::Deprecation.warn <<~eowarn
- Single arity template handlers are deprecated. Template handlers must
+ Single arity template handlers are deprecated. Template handlers must
now accept two parameters, the view object and the source for the view object.
Change:
- >> #{handler.class}#call(#{params.map(&:last).join(", ")})
+ >> #{handler}.call(#{params.map(&:last).join(", ")})
To:
- >> #{handler.class}#call(#{params.map(&:last).join(", ")}, source)
+ >> #{handler}.call(#{params.map(&:last).join(", ")}, source)
eowarn
handler = LegacyHandlerWrapper.new(handler)
end