aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-12-26 17:02:40 -0700
committerSean Griffin <sean@thoughtbot.com>2014-12-26 17:02:40 -0700
commit3eb16cea7eeecaa8815baabc75dfec3cdad684c2 (patch)
treeafbf3023bd751563af2263516427868791118bad
parent8ce6fd559445188b1cbccafd50455ee217d2c752 (diff)
downloadrails-3eb16cea7eeecaa8815baabc75dfec3cdad684c2.tar.gz
rails-3eb16cea7eeecaa8815baabc75dfec3cdad684c2.tar.bz2
rails-3eb16cea7eeecaa8815baabc75dfec3cdad684c2.zip
Go through normal where logic in `apply_join_dependency`
Part of the larger refactoring to remove type casting from Arel.
-rw-r--r--activerecord/lib/active_record/relation/finder_methods.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb
index 357861caaa..088bc203b7 100644
--- a/activerecord/lib/active_record/relation/finder_methods.rb
+++ b/activerecord/lib/active_record/relation/finder_methods.rb
@@ -397,7 +397,7 @@ module ActiveRecord
else
if relation.limit_value
limited_ids = limited_ids_for(relation)
- limited_ids.empty? ? relation.none! : relation.where!(table[primary_key].in(limited_ids))
+ limited_ids.empty? ? relation.none! : relation.where!(primary_key => limited_ids)
end
relation.except(:limit, :offset)
end