From 55b24888bbe23af3361fa23891c150e28f27809e Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Fri, 3 Aug 2012 11:51:52 +0100 Subject: Remove ActiveRecord::Base.to_a On reflection, it seems like a bit of a weird method to have on ActiveRecord::Base, and it shouldn't be needed most of the time anyway. --- activerecord/test/cases/batches_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/cases/batches_test.rb') diff --git a/activerecord/test/cases/batches_test.rb b/activerecord/test/cases/batches_test.rb index 7583539d04..cdd4b49042 100644 --- a/activerecord/test/cases/batches_test.rb +++ b/activerecord/test/cases/batches_test.rb @@ -116,7 +116,7 @@ class EachTest < ActiveRecord::TestCase end def test_find_in_batches_should_not_ignore_the_default_scope_if_it_is_other_then_order - special_posts_ids = SpecialPostWithDefaultScope.to_a.map(&:id).sort + special_posts_ids = SpecialPostWithDefaultScope.all.map(&:id).sort posts = [] SpecialPostWithDefaultScope.find_in_batches do |batch| posts.concat(batch) -- cgit v1.2.3