mirror of https://github.com/rails/rails
Remove deprecated constant `AbstractController::Helpers::MissingHelperError`
This commit is contained in:
parent
b2f96d07d4
commit
87bc1190fb
|
@ -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
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ require "active_support/core_ext/name_error"
|
|||
|
||||
module AbstractController
|
||||
module Helpers
|
||||
include ActiveSupport::Deprecation::DeprecatedConstantAccessor
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
|
@ -24,23 +23,6 @@ module AbstractController
|
|||
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
|
||||
|
|
|
@ -264,12 +264,6 @@ class HelperTest < ActiveSupport::TestCase
|
|||
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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue