diff options
4 files changed, 16 insertions, 4 deletions
diff --git a/actionview/lib/action_view/base.rb b/actionview/lib/action_view/base.rb index fe9f3f9503..b143e13c96 100644 --- a/actionview/lib/action_view/base.rb +++ b/actionview/lib/action_view/base.rb @@ -224,10 +224,12 @@ module ActionView #:nodoc: # :startdoc: - def initialize(renderer, assigns = {}, controller = nil, formats = NULL) #:nodoc: + def initialize(renderer = nil, assigns = {}, controller = nil, formats = NULL) #:nodoc: @_config = ActiveSupport::InheritableOptions.new - unless formats == NULL + if formats == NULL + formats = nil + else ActiveSupport::Deprecation.warn <<~eowarn Passing formats to ActionView::Base.new is deprecated eowarn diff --git a/actionview/test/template/render_test.rb b/actionview/test/template/render_test.rb index ab67423ea1..76ffe3415d 100644 --- a/actionview/test/template/render_test.rb +++ b/actionview/test/template/render_test.rb @@ -336,6 +336,16 @@ module RenderTestCases assert_equal "Hello: davidHello: mary", @view.render(partial: "test/customer", collection: customers) end + def test_deprecated_constructor + assert_deprecated do + ActionView::Base.new + end + + assert_deprecated do + ActionView::Base.new ["/a"] + end + end + def test_render_partial_without_object_does_not_put_partial_name_to_local_assigns assert_equal "false", @view.render(partial: "test/partial_name_in_local_assigns") end diff --git a/activerecord/lib/active_record/middleware/database_selector.rb b/activerecord/lib/active_record/middleware/database_selector.rb index 06529bc1c9..adcfca4f8d 100644 --- a/activerecord/lib/active_record/middleware/database_selector.rb +++ b/activerecord/lib/active_record/middleware/database_selector.rb @@ -43,7 +43,7 @@ module ActiveRecord attr_reader :resolver_klass, :operations_klass - # Middleware that determines which database connection to use in a mutliple + # Middleware that determines which database connection to use in a multiple # database application. def call(env) request = ActionDispatch::Request.new(env) diff --git a/activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb b/activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb index 69eb617d7b..6bf501a607 100644 --- a/activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb +++ b/activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb @@ -28,7 +28,7 @@ module ActiveStorage private def draw_first_page_from(file, &block) - # use 72 dpi to match thumbnail dimesions of the PDF + # use 72 dpi to match thumbnail dimensions of the PDF draw self.class.pdftoppm_path, "-singlefile", "-r", "72", "-png", file.path, &block end end |