diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-12-30 12:13:55 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-12-30 12:14:00 +0530 |
commit | 8734f9a2710e6ad62caa7e1dcf543b83562e18ed (patch) | |
tree | ebdbe1b9df9d88e2afcf8b2a68bab610ffab951d /activerecord/lib | |
parent | bdf59a561877ab9ac97a89697eaeb8e0db88a408 (diff) | |
download | rails-8734f9a2710e6ad62caa7e1dcf543b83562e18ed.tar.gz rails-8734f9a2710e6ad62caa7e1dcf543b83562e18ed.tar.bz2 rails-8734f9a2710e6ad62caa7e1dcf543b83562e18ed.zip |
Relation#many? shoud load the records if there's a LIMIT
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |