Skip to content

Commit 2af68b2

Browse files
committed
Remove deprecated Rails.application.config.active_record.suppress_multiple_database_warning
1 parent 052b5ed commit 2af68b2

File tree

4 files changed

+7
-34
lines changed

4 files changed

+7
-34
lines changed

activerecord/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Remove deprecated `Rails.application.config.active_record.suppress_multiple_database_warning`.
2+
3+
*Rafael Mendonça França*
4+
15
* Add ActiveRecord::Encryption::MessagePackMessageSerializer
26

37
Serialize data to the MessagePack format, for efficient storage in binary columns.

activerecord/lib/active_record.rb

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -413,20 +413,6 @@ def self.global_executor_concurrency # :nodoc:
413413
singleton_class.attr_accessor :dump_schemas
414414
self.dump_schemas = :schema_search_path
415415

416-
def self.suppress_multiple_database_warning
417-
ActiveRecord.deprecator.warn(<<-MSG.squish)
418-
config.active_record.suppress_multiple_database_warning is deprecated and will be removed in Rails 7.2.
419-
It no longer has any effect and should be removed from the configuration file.
420-
MSG
421-
end
422-
423-
def self.suppress_multiple_database_warning=(value)
424-
ActiveRecord.deprecator.warn(<<-MSG.squish)
425-
config.active_record.suppress_multiple_database_warning= is deprecated and will be removed in Rails 7.2.
426-
It no longer has any effect and should be removed from the configuration file.
427-
MSG
428-
end
429-
430416
##
431417
# :singleton-method: verify_foreign_keys_for_fixtures
432418
# If true, Rails will verify all foreign keys in the database after loading fixtures.

guides/source/7_2_release_notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ Please refer to the [Changelog][active-record] for detailed changes.
105105

106106
### Removals
107107

108+
* Remove deprecated `Rails.application.config.active_record.suppress_multiple_database_warning`.
109+
108110
### Deprecations
109111

110112
### Notable changes

railties/test/application/configuration_test.rb

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2008,22 +2008,6 @@ def index
20082008
assert_not ActiveRecord.verbose_query_logs
20092009
end
20102010

2011-
test "config.active_record.suppress_multiple_database_warning getter is deprecated" do
2012-
app "development"
2013-
2014-
assert_deprecated(Rails.application.deprecators[:active_record]) do
2015-
ActiveRecord.suppress_multiple_database_warning
2016-
end
2017-
end
2018-
2019-
test "config.active_record.suppress_multiple_database_warning setter is deprecated" do
2020-
app "development"
2021-
2022-
assert_deprecated(Rails.application.deprecators[:active_record]) do
2023-
ActiveRecord.suppress_multiple_database_warning = true
2024-
end
2025-
end
2026-
20272011
test "config.active_record.use_yaml_unsafe_load is false by default" do
20282012
app "production"
20292013
assert_not ActiveRecord.use_yaml_unsafe_load
@@ -2385,16 +2369,13 @@ def index
23852369
assert_equal({}, Rails.application.config.load_database_yaml)
23862370
end
23872371

2388-
test "setup_initial_database_yaml does not print a warning if config.active_record.suppress_multiple_database_warning is true" do
2372+
test "setup_initial_database_yaml does not print a warning" do
23892373
app_file "config/database.yml", <<-YAML
23902374
<%= Rails.env %>:
23912375
username: bobby
23922376
adapter: sqlite3
23932377
database: 'dev_db'
23942378
YAML
2395-
add_to_config <<-RUBY
2396-
config.active_record.suppress_multiple_database_warning = true
2397-
RUBY
23982379
app "development"
23992380

24002381
assert_silent do

0 commit comments

Comments
 (0)