Permalink
Browse files

removing space errors

  • Loading branch information...
1 parent 1fd3ac6 commit 6da2a3e13cb280cf52337764d0a7c9fb2e55c164 @tenderlove tenderlove committed Nov 18, 2010
@@ -403,7 +403,7 @@ def append_conditions(reflection, preload_options)
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)
@@ -102,7 +102,7 @@ def test_preloading_habtm_in_one_queries_when_database_has_no_limit_on_ids_it_ca
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])

0 comments on commit 6da2a3e

Please sign in to comment.