aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-11-02 12:23:44 -0700
committerSean Griffin <sean@thoughtbot.com>2014-11-02 12:23:44 -0700
commitd3fbd9dbb8f3c215c5364c07e32b5bc1d2497633 (patch)
tree848ce0becc2f416f92aa2984ef18664698718d0a
parent1d6d0cc2455f65454f7cb8f938204cddf6380e24 (diff)
downloadrails-d3fbd9dbb8f3c215c5364c07e32b5bc1d2497633.tar.gz
rails-d3fbd9dbb8f3c215c5364c07e32b5bc1d2497633.tar.bz2
rails-d3fbd9dbb8f3c215c5364c07e32b5bc1d2497633.zip
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.
-rw-r--r--activerecord/lib/active_record/relation/predicate_builder/relation_handler.rb2
1 files changed, 1 insertions, 1 deletions
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