diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-07-25 09:37:51 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-07-25 09:37:51 -0700 |
commit | af29af674ef5a20b17ed9615323aaaf14ed6384f (patch) | |
tree | f51eda07d7f2e11d0f7b42537c825c2ce8f4b257 | |
parent | ca3074c43431a00f52e88bad0901f98f988fe659 (diff) | |
parent | 8998441967a8cfc6e4302c29664ab9d0acd77704 (diff) | |
download | rails-af29af674ef5a20b17ed9615323aaaf14ed6384f.tar.gz rails-af29af674ef5a20b17ed9615323aaaf14ed6384f.tar.bz2 rails-af29af674ef5a20b17ed9615323aaaf14ed6384f.zip |
Merge pull request #11598 from Karunakar/flat_map1
Used flat_map instead of map.flatten in mas_many_through_associations_test.rb
-rw-r--r-- | activerecord/test/cases/associations/has_many_through_associations_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb index 119e94b831..85296a5a83 100644 --- a/activerecord/test/cases/associations/has_many_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb @@ -647,7 +647,7 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase sarah = Person.create!(:first_name => 'Sarah', :primary_contact_id => people(:susan).id, :gender => 'F', :number1_fan_id => 1) john = Person.create!(:first_name => 'John', :primary_contact_id => sarah.id, :gender => 'M', :number1_fan_id => 1) assert_equal sarah.agents, [john] - assert_equal people(:susan).agents.map(&:agents).flatten, people(:susan).agents_of_agents + assert_equal people(:susan).agents.flat_map(&:agents), people(:susan).agents_of_agents end def test_associate_existing_with_nonstandard_primary_key_on_belongs_to |