Skip to content

Commit

Permalink
Merge pull request #47919 from jonathanhefner/deprecators-rename-rail…
Browse files Browse the repository at this point in the history
…s-as-railties

Rename `:rails` deprecator as `:railties`
  • Loading branch information
jonathanhefner committed Apr 11, 2023
2 parents 2675c90 + 0fc57a4 commit d9037d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions railties/lib/rails/application.rb
Expand Up @@ -225,13 +225,9 @@ def message_verifier(verifier_name)
# The collection's configuration methods affect all deprecators in the
# collection. Additionally, the collection's +silence+ method silences all
# deprecators in the collection for the duration of a given block.
#
# The collection is prepopulated with a default deprecator, which can be
# accessed via <tt>deprecators[:rails]</tt>. More deprecators can be added
# via <tt>deprecators[name] = deprecator</tt>.
def deprecators
@deprecators ||= ActiveSupport::Deprecation::Deprecators.new.tap do |deprecators|
deprecators[:rails] = Rails.deprecator
deprecators[:railties] = Rails.deprecator
end
end

Expand Down
2 changes: 1 addition & 1 deletion railties/test/application/configuration_test.rb
Expand Up @@ -4022,7 +4022,7 @@ def new(app); self; end
assert_equal ActiveRecord.deprecator, Rails.application.deprecators[:active_record]
assert_equal ActiveStorage.deprecator, Rails.application.deprecators[:active_storage]
assert_equal ActiveSupport.deprecator, Rails.application.deprecators[:active_support]
assert_equal Rails.deprecator, Rails.application.deprecators[:rails]
assert_equal Rails.deprecator, Rails.application.deprecators[:railties]
end

test "can entirely opt out of deprecation warnings" do
Expand Down

0 comments on commit d9037d0

Please sign in to comment.