From d3fbd9dbb8f3c215c5364c07e32b5bc1d2497633 Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Sun, 2 Nov 2014 12:23:44 -0700 Subject: Pass the `SelectManager`, rather than the AST when querying w/ Relation Arel specifically handles `SelectManager`, with the same logic we're currently performing. The AST is `Enumerable`, which Arel looks for separately now. --- .../lib/active_record/relation/predicate_builder/relation_handler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/relation/predicate_builder/relation_handler.rb b/activerecord/lib/active_record/relation/predicate_builder/relation_handler.rb index 618fa3cdd9..063150958a 100644 --- a/activerecord/lib/active_record/relation/predicate_builder/relation_handler.rb +++ b/activerecord/lib/active_record/relation/predicate_builder/relation_handler.rb @@ -6,7 +6,7 @@ module ActiveRecord value = value.select(value.klass.arel_table[value.klass.primary_key]) end - attribute.in(value.arel.ast) + attribute.in(value.arel) end end end -- cgit v1.2.3