From cadd9661ad407340a297bd8f1c71a4c02a808f0c Mon Sep 17 00:00:00 2001 From: eileencodes Date: Wed, 26 Feb 2020 19:52:49 -0500 Subject: [PATCH] Remove unused argument This was leftover in debugging we did to support `shard` in `connected_to`. We don't need this because `with_shard` already has access to `connection_specification_name` because they are in the same class. --- activerecord/lib/active_record/connection_handling.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activerecord/lib/active_record/connection_handling.rb b/activerecord/lib/active_record/connection_handling.rb index 77183aeed6..012be0c236 100644 --- a/activerecord/lib/active_record/connection_handling.rb +++ b/activerecord/lib/active_record/connection_handling.rb @@ -157,7 +157,7 @@ def connected_to(database: nil, role: nil, shard: nil, prevent_writes: false, &b with_handler(role, &blk) elsif shard - with_shard(connection_specification_name, shard, role || current_role, prevent_writes, &blk) + with_shard(shard, role || current_role, prevent_writes, &blk) elsif role with_role(role, prevent_writes, &blk) else @@ -303,7 +303,7 @@ def with_role(role, prevent_writes, &blk) end end - def with_shard(connection_specification_name, pool_key, role, prevent_writes) + def with_shard(pool_key, role, prevent_writes) old_pool_key = current_pool_key with_role(role, prevent_writes) do -- GitLab