From a4c0281dada222d350dc337c3b283e4254b07f1b Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 9 Jul 2013 17:24:10 -0700 Subject: [PATCH] fix visibility of the relation construction methods --- .../lib/active_record/relation/finder_methods.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index 5ce889ce50..2d3bd563ac 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 -- GitLab