diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-18 10:01:21 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-18 10:01:29 -0800 |
commit | 26923756fb23eb9c2993a365f9819027f20d5e77 (patch) | |
tree | 6debf9e84473b55c8da686eae72e0f046ac50e4d /activerecord | |
parent | c5a284f8eb6113f06030ea7a18543905146e8768 (diff) | |
download | rails-26923756fb23eb9c2993a365f9819027f20d5e77.tar.gz rails-26923756fb23eb9c2993a365f9819027f20d5e77.tar.bz2 rails-26923756fb23eb9c2993a365f9819027f20d5e77.zip |
removing space errors
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/association_preload.rb | 2 | ||||
-rw-r--r-- | activerecord/test/cases/associations/eager_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/association_preload.rb b/activerecord/lib/active_record/association_preload.rb index a205549d60..9743b1b4a7 100644 --- a/activerecord/lib/active_record/association_preload.rb +++ b/activerecord/lib/active_record/association_preload.rb @@ -387,7 +387,7 @@ module ActiveRecord def in_or_equals_for_ids(ids) ids.size > 1 ? "IN (?)" : "= ?" end - + # Some databases impose a limit on the number of ids in a list (in Oracle its 1000) # Make several smaller queries if necessary or make one query if the adapter supports it def associated_records(ids) diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb index c532522e76..c00b8a1cde 100644 --- a/activerecord/test/cases/associations/eager_test.rb +++ b/activerecord/test/cases/associations/eager_test.rb @@ -102,7 +102,7 @@ class EagerAssociationTest < ActiveRecord::TestCase posts = Post.find(:all, :include=>:categories) assert_equal 7, posts.size end - + def test_load_associated_records_in_one_query_when_adapter_has_no_limit Post.connection.expects(:ids_in_list_limit).at_least_once.returns(nil) Post.expects(:i_was_called).with([1,2,3,4,5,6,7]).returns([1]) |