diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index 5ce889ce50b35ebc0ac332304d5d2dad9576895d..2d3bd563ac0080f9839af45134a99f4f194a5b2e 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -238,7 +238,7 @@ def raise_record_not_found_exception!(ids, result_size, expected_size) #:nodoc: raise RecordNotFound, error end - protected + private def find_with_associations join_dependency = construct_join_dependency @@ -290,6 +290,12 @@ def limited_ids_for(relation) id_rows.map {|row| row[primary_key]} end + def using_limitable_reflections?(reflections) + reflections.none? { |r| r.collection? } + end + + protected + def find_with_ids(*ids) expects_array = ids.first.kind_of?(Array) return ids.first if expects_array && ids.first.empty? @@ -379,9 +385,5 @@ def find_last end end end - - def using_limitable_reflections?(reflections) - reflections.none? { |r| r.collection? } - end end end