diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-02-14 02:17:15 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-02-14 02:17:15 +0900 |
commit | 4c45801ea09e8c6fd7009585e6ae0af0d36c2462 (patch) | |
tree | 9ce3bfd5207ffafcc756814c3865b835a38cfe1e | |
parent | ebdaa0447dfcef98ee437875d4e04abbd17ad9f4 (diff) | |
download | rails-4c45801ea09e8c6fd7009585e6ae0af0d36c2462.tar.gz rails-4c45801ea09e8c6fd7009585e6ae0af0d36c2462.tar.bz2 rails-4c45801ea09e8c6fd7009585e6ae0af0d36c2462.zip |
Address to useless assignment `formats = nil` after #35254
https://codeclimate.com/github/rails/rails/pull/35254
-rw-r--r-- | actionview/lib/action_view/base.rb | 4 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_first_layer.html.erb | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/actionview/lib/action_view/base.rb b/actionview/lib/action_view/base.rb index fef4b4bbb0..712e5d251e 100644 --- a/actionview/lib/action_view/base.rb +++ b/actionview/lib/action_view/base.rb @@ -239,9 +239,7 @@ module ActionView #:nodoc: def initialize(lookup_context = nil, assigns = {}, controller = nil, formats = NULL) #:nodoc: @_config = ActiveSupport::InheritableOptions.new - if formats == NULL - formats = nil - else + unless formats == NULL ActiveSupport::Deprecation.warn <<~eowarn Passing formats to ActionView::Base.new is deprecated eowarn diff --git a/actionview/test/fixtures/test/_first_layer.html.erb b/actionview/test/fixtures/test/_first_layer.html.erb index 9f60d20e24..c1f1acb410 100644 --- a/actionview/test/fixtures/test/_first_layer.html.erb +++ b/actionview/test/fixtures/test/_first_layer.html.erb @@ -2,5 +2,3 @@ [ <%= render(partial: "first").chomp.html_safe %>, ]} - - |