aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorKarunakar (Ruby) <revurikarna@gmail.com>2013-07-25 21:55:43 +0530
committerKarunakar (Ruby) <revurikarna@gmail.com>2013-07-25 21:58:26 +0530
commit8998441967a8cfc6e4302c29664ab9d0acd77704 (patch)
treef51eda07d7f2e11d0f7b42537c825c2ce8f4b257 /activerecord/test/cases
parentca3074c43431a00f52e88bad0901f98f988fe659 (diff)
downloadrails-8998441967a8cfc6e4302c29664ab9d0acd77704.tar.gz
rails-8998441967a8cfc6e4302c29664ab9d0acd77704.tar.bz2
rails-8998441967a8cfc6e4302c29664ab9d0acd77704.zip
used flat_map instead of map.flatten
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/associations/has_many_through_associations_test.rb2
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