diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2019-04-04 13:36:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-04 13:36:34 -0400 |
commit | 3809e3e5e9edc2fcc1eac2f8266ad1d24a754618 (patch) | |
tree | 836cd832e797d06e729c7ccb285375993c4c045b | |
parent | 50fba828d533ff75671ca8b83337dd99aa613ff7 (diff) | |
parent | b2b2f70f1f81b54b799118e8a4feb601ab480c41 (diff) | |
download | rails-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.rb | 6 |
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 |