From 87bc1190fbc4f8e18682f1bb959a53b263a2df5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Thu, 12 Oct 2023 17:32:26 +0000 Subject: [PATCH] Remove deprecated constant `AbstractController::Helpers::MissingHelperError` --- actionpack/CHANGELOG.md | 4 ++++ actionpack/lib/abstract_controller/helpers.rb | 18 ------------------ actionpack/test/controller/helper_test.rb | 6 ------ guides/source/7_2_release_notes.md | 2 ++ 4 files changed, 6 insertions(+), 24 deletions(-) diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index ee70d46a83d7b..172e89cffacfa 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -1,3 +1,7 @@ +* Remove deprecated constant `AbstractController::Helpers::MissingHelperError`. + + *Rafael Mendonça França* + * Fix a race condition that could cause a `Text file busy - chromedriver` error with parallel system tests diff --git a/actionpack/lib/abstract_controller/helpers.rb b/actionpack/lib/abstract_controller/helpers.rb index 4cf4adf598163..043774c50080a 100644 --- a/actionpack/lib/abstract_controller/helpers.rb +++ b/actionpack/lib/abstract_controller/helpers.rb @@ -5,7 +5,6 @@ module AbstractController module Helpers - include ActiveSupport::Deprecation::DeprecatedConstantAccessor extend ActiveSupport::Concern included do @@ -24,23 +23,6 @@ module Helpers self._helpers = define_helpers_module(self) end - class DeprecatedMissingHelperError < LoadError - def initialize(error, path) - @error = error - @path = "helpers/#{path}.rb" - set_backtrace error.backtrace - - if /^#{path}(\.rb)?$/.match?(error.path) - super("Missing helper file helpers/%s.rb" % path) - else - raise error - end - end - end - deprecate_constant "MissingHelperError", "AbstractController::Helpers::DeprecatedMissingHelperError", - message: "AbstractController::Helpers::MissingHelperError has been deprecated. If a Helper is not present, a NameError will be raised instead.", - deprecator: AbstractController.deprecator - def _helpers self.class._helpers end diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb index 7b904e0c81802..f1bfb8436c25a 100644 --- a/actionpack/test/controller/helper_test.rb +++ b/actionpack/test/controller/helper_test.rb @@ -264,12 +264,6 @@ def test_helper_proxy_config assert_equal "smth", AllHelpersController.helpers.config.my_var end - def test_missing_helper_error_is_deprecated - assert_deprecated(AbstractController.deprecator) do - AbstractController::Helpers::MissingHelperError - end - end - private def expected_helper_methods TestHelper.instance_methods diff --git a/guides/source/7_2_release_notes.md b/guides/source/7_2_release_notes.md index d022b2e416917..ae348b72a45fd 100644 --- a/guides/source/7_2_release_notes.md +++ b/guides/source/7_2_release_notes.md @@ -52,6 +52,8 @@ Please refer to the [Changelog][action-pack] for detailed changes. * Remove deprecated constant `ActionDispatch::IllegalStateError`. +* Remove deprecated constant `AbstractController::Helpers::MissingHelperError`. + ### Deprecations ### Notable changes