aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/inheritance_test.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-08-03 11:51:52 +0100
committerJon Leighton <j@jonathanleighton.com>2012-08-03 11:51:52 +0100
commit55b24888bbe23af3361fa23891c150e28f27809e (patch)
tree1bb4d28de4838071f31afcf861fc623c06359966 /activerecord/test/cases/inheritance_test.rb
parent0a6833b6f701c8c8febadfe2f45e25df29493602 (diff)
downloadrails-55b24888bbe23af3361fa23891c150e28f27809e.tar.gz
rails-55b24888bbe23af3361fa23891c150e28f27809e.tar.bz2
rails-55b24888bbe23af3361fa23891c150e28f27809e.zip
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.
Diffstat (limited to 'activerecord/test/cases/inheritance_test.rb')
-rw-r--r--activerecord/test/cases/inheritance_test.rb4
1 files changed, 2 insertions, 2 deletions
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