Skip to content

Commit 5d58bbe

Browse files
committed
Remove the legacy_connection_handling setter
This code is old and don't need to exist anymore.
1 parent 45cf673 commit 5d58bbe

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

activerecord/lib/active_record.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -268,14 +268,6 @@ def self.db_warnings_action=(action)
268268
singleton_class.attr_accessor :reading_role
269269
self.reading_role = :reading
270270

271-
def self.legacy_connection_handling=(_)
272-
raise ArgumentError, <<~MSG.squish
273-
The `legacy_connection_handling` setter was deprecated in 7.0 and removed in 7.1,
274-
but is still defined in your configuration. Please remove this call as it no longer
275-
has any effect."
276-
MSG
277-
end
278-
279271
##
280272
# :singleton-method: async_query_executor
281273
# Sets the async_query_executor for an application. By default the thread pool executor

railties/test/application/configuration_test.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4422,17 +4422,6 @@ def new(app); self; end
44224422
ActiveRecord::Base.configurations = original_configurations
44234423
end
44244424

4425-
test "raises an error if legacy_connection_handling is set" do
4426-
build_app(initializers: true)
4427-
add_to_env_config "production", "config.active_record.legacy_connection_handling = true"
4428-
4429-
error = assert_raise(ArgumentError) do
4430-
app "production"
4431-
end
4432-
4433-
assert_match(/The `legacy_connection_handling` setter was deprecated in 7.0 and removed in 7.1, but is still defined in your configuration. Please remove this call as it no longer has any effect./, error.message)
4434-
end
4435-
44364425
test "raise_on_missing_translations = true" do
44374426
add_to_config "config.i18n.raise_on_missing_translations = true"
44384427
app "development"

0 commit comments

Comments
 (0)