diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-06-25 20:58:20 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-06-29 01:26:18 +0900 |
commit | eacec5defe89dd9593d44f4831aa861a2e0e55d4 (patch) | |
tree | be04e33711ca401019c985cc266b6ee8cc942999 /activerecord/test/cases/associations | |
parent | bf7606d4ebae24e7ba49e34190c21cbad0a98640 (diff) | |
download | rails-eacec5defe89dd9593d44f4831aa861a2e0e55d4.tar.gz rails-eacec5defe89dd9593d44f4831aa861a2e0e55d4.tar.bz2 rails-eacec5defe89dd9593d44f4831aa861a2e0e55d4.zip |
Don't passing `klass.connection` to `AssociationScope`
Passing `klass.connection` is redundant because `AssociationScope` is
passed an association itself and an association has `klass`.
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r-- | activerecord/test/cases/associations/association_scope_test.rb | 3 |
1 files changed, 1 insertions, 2 deletions
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 |