From 6c235dd95812a7c4e8123b6d34d6f3433805ee1c Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Tue, 27 Jan 2015 12:07:06 -0700 Subject: Use an `Attribute` object to represent a bind value The column is primarily used for type casting, which we're trying to separate from the idea of a column. Since what we really need is the combination of a name, type, and value, let's use the object that we already have to represent that concept, rather than this tuple. No consumers of the bind values have been changed, only the producers (outside of tests which care too much about internals). This is *finally* possible since the bind values are now produced from a reasonable number of lcoations. --- activerecord/test/cases/associations/association_scope_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/cases/associations') diff --git a/activerecord/test/cases/associations/association_scope_test.rb b/activerecord/test/cases/associations/association_scope_test.rb index fc5dbd0890..472e270f8c 100644 --- a/activerecord/test/cases/associations/association_scope_test.rb +++ b/activerecord/test/cases/associations/association_scope_test.rb @@ -8,7 +8,7 @@ module ActiveRecord test 'does not duplicate conditions' do scope = AssociationScope.scope(Author.new.association(:welcome_posts), Author.connection) - binds = scope.where_clause.binds.map(&:last) + binds = scope.where_clause.binds.map(&:value) assert_equal binds.uniq, binds end end -- cgit v1.2.3