Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

removing space errors

  • Loading branch information...
commit 26923756fb23eb9c2993a365f9819027f20d5e77 1 parent c5a284f
@tenderlove tenderlove authored
View
2  activerecord/lib/active_record/association_preload.rb
@@ -387,7 +387,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)
View
2  activerecord/test/cases/associations/eager_test.rb
@@ -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])
Please sign in to comment.
Something went wrong with that request. Please try again.