From eacec5defe89dd9593d44f4831aa861a2e0e55d4 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 25 Jun 2017 20:58:20 +0900 Subject: Don't passing `klass.connection` to `AssociationScope` Passing `klass.connection` is redundant because `AssociationScope` is passed an association itself and an association has `klass`. --- activerecord/test/cases/associations/association_scope_test.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activerecord/test/cases/associations/association_scope_test.rb') diff --git a/activerecord/test/cases/associations/association_scope_test.rb b/activerecord/test/cases/associations/association_scope_test.rb index c322333f6d..c54542ff7b 100644 --- a/activerecord/test/cases/associations/association_scope_test.rb +++ b/activerecord/test/cases/associations/association_scope_test.rb @@ -6,8 +6,7 @@ module ActiveRecord module Associations class AssociationScopeTest < ActiveRecord::TestCase test "does not duplicate conditions" do - scope = AssociationScope.scope(Author.new.association(:welcome_posts), - Author.connection) + scope = AssociationScope.scope(Author.new.association(:welcome_posts)) binds = scope.where_clause.binds.map(&:value) assert_equal binds.uniq, binds end -- cgit v1.2.3