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/inheritance_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/test/cases/inheritance_test.rb') diff --git a/activerecord/test/cases/inheritance_test.rb b/activerecord/test/cases/inheritance_test.rb index b14f580c77..e80259a7f1 100644 --- a/activerecord/test/cases/inheritance_test.rb +++ b/activerecord/test/cases/inheritance_test.rb @@ -27,7 +27,7 @@ class InheritanceTest < ActiveRecord::TestCase end }) company.save! - company = Company.to_a.find { |x| x.id == company.id } + company = Company.all.to_a.find { |x| x.id == company.id } assert_equal ' ', company.type end @@ -179,7 +179,7 @@ class InheritanceTest < ActiveRecord::TestCase def test_update_all_within_inheritance Client.update_all "name = 'I am a client'" - assert_equal "I am a client", Client.to_a.first.name + assert_equal "I am a client", Client.first.name # Order by added as otherwise Oracle tests were failing because of different order of results assert_equal "37signals", Firm.all.merge!(:order => "id").to_a.first.name end -- cgit v1.2.3