Skip to content

Commit

Permalink
Merge pull request #51776 from Shopify/missing-klass-delegation
Browse files Browse the repository at this point in the history
Fix `.with_connection` to not set current scope
  • Loading branch information
byroot committed May 10, 2024
2 parents 735da84 + 4bd4fcc commit f8537e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/relation/delegation.rb
Expand Up @@ -100,7 +100,7 @@ def #{method}(...)
:to_sentence, :to_fs, :to_formatted_s, :as_json,
:shuffle, :split, :slice, :index, :rindex, to: :records

delegate :primary_key, :connection, :transaction, to: :klass
delegate :primary_key, :lease_connection, :connection, :with_connection, :transaction, to: :klass

module ClassSpecificRelation # :nodoc:
extend ActiveSupport::Concern
Expand Down

0 comments on commit f8537e9

Please sign in to comment.