From 3eb16cea7eeecaa8815baabc75dfec3cdad684c2 Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Fri, 26 Dec 2014 17:02:40 -0700 Subject: Go through normal where logic in `apply_join_dependency` Part of the larger refactoring to remove type casting from Arel. --- activerecord/lib/active_record/relation/finder_methods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3