diff options
author | Jon Leighton <j@jonathanleighton.com> | 2012-07-27 12:01:25 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2012-07-27 13:34:12 +0100 |
commit | 6a81ccd69d96f36f4322ef927191ab5a35e68d68 (patch) | |
tree | eefd3b92255fa3969e412c88633332a47808f3c5 /activerecord/test/cases/adapters/mysql | |
parent | f1afd7765c2a35cc77e1ee40466db36f181e29f5 (diff) | |
download | rails-6a81ccd69d96f36f4322ef927191ab5a35e68d68.tar.gz rails-6a81ccd69d96f36f4322ef927191ab5a35e68d68.tar.bz2 rails-6a81ccd69d96f36f4322ef927191ab5a35e68d68.zip |
ActiveRecord::Base.all returns a Relation.
Previously it returned an Array.
If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This
is more explicit.
In most cases this should not break existing code, since
Relations use method_missing to delegate unknown methods to #to_a
anyway.
Diffstat (limited to 'activerecord/test/cases/adapters/mysql')
-rw-r--r-- | activerecord/test/cases/adapters/mysql/reserved_word_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/adapters/mysql/reserved_word_test.rb b/activerecord/test/cases/adapters/mysql/reserved_word_test.rb index 8e3eeac81e..1d12f1bc47 100644 --- a/activerecord/test/cases/adapters/mysql/reserved_word_test.rb +++ b/activerecord/test/cases/adapters/mysql/reserved_word_test.rb @@ -130,7 +130,7 @@ class MysqlReservedWordTest < ActiveRecord::TestCase end def test_associations_work_with_reserved_words - assert_nothing_raised { Select.scoped(:includes => [:groups]).all } + assert_nothing_raised { Select.scoped(:includes => [:groups]).to_a } end #the following functions were added to DRY test cases |