From 8734f9a2710e6ad62caa7e1dcf543b83562e18ed Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Wed, 30 Dec 2009 12:13:55 +0530 Subject: Relation#many? shoud load the records if there's a LIMIT --- activerecord/lib/active_record/relation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index fa517aba38..52d66dc20a 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -250,7 +250,7 @@ module ActiveRecord if block_given? to_a.many? { |*block_args| yield(*block_args) } else - size > 1 + @relation.send(:taken).present? ? to_a.many? : size > 1 end end -- cgit v1.2.3