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/test | |
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/test')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index 5d6f9ad430..6605c8bf34 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -471,4 +471,10 @@ class RelationTest < ActiveRecord::TestCase assert posts.loaded? end + def test_many_with_limits + posts = Post.scoped + + assert posts.many? + assert ! posts.limit(1).many? + end end |