Skip to content

Commit 54ddb3b

Browse files
committed
Remove deprecated ActiveRecord::Base.connection_config
1 parent 50ec25b commit 54ddb3b

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
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 `ActiveRecord::Base.connection_config`.
2+
3+
*Rafael Mendonça França*
4+
15
* Filter attributes in SQL logs
26

37
Previously, SQL queries in logs containing `ActiveRecord::Base.filter_attributes` were not filtered.

activerecord/lib/active_record/connection_handling.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -296,17 +296,6 @@ def primary_class? # :nodoc:
296296
self == Base || application_record_class?
297297
end
298298

299-
# Returns the configuration of the associated connection as a hash:
300-
#
301-
# ActiveRecord::Base.connection_config
302-
# # => {pool: 5, timeout: 5000, database: "db/development.sqlite3", adapter: "sqlite3"}
303-
#
304-
# Please use only for reading.
305-
def connection_config
306-
connection_pool.db_config.configuration_hash
307-
end
308-
deprecate connection_config: "Use connection_db_config instead"
309-
310299
# Returns the db_config object from the associated connection:
311300
#
312301
# ActiveRecord::Base.connection_db_config

guides/source/7_0_release_notes.md

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

255255
* Remove deprecated `:return_false_on_aborted_enqueue` option.
256256

257+
* Remove deprecated `ActiveRecord::Base.connection_config`.
258+
257259
### Deprecations
258260

259261
* Deprecated `Rails.config.active_job.skip_after_callbacks_if_terminated`.

0 commit comments

Comments
 (0)