From 26923756fb23eb9c2993a365f9819027f20d5e77 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 18 Nov 2010 10:01:21 -0800 Subject: removing space errors --- activerecord/lib/active_record/association_preload.rb | 2 +- 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]) -- cgit v1.2.3