diff options
author | Erik Michaels-Ober <sferik@gmail.com> | 2014-03-03 19:23:22 -0800 |
---|---|---|
committer | Erik Michaels-Ober <sferik@gmail.com> | 2014-03-03 19:23:22 -0800 |
commit | 3413b88a3d6b2b022dfb57e42565446b1e024314 (patch) | |
tree | b3b7f62107f5fb6e76cdf0e90ea78395cacf2188 /activerecord/test/cases/autosave_association_test.rb | |
parent | 817fe31196dd59ee31f71ef1740122b6759cf16d (diff) | |
download | rails-3413b88a3d6b2b022dfb57e42565446b1e024314.tar.gz rails-3413b88a3d6b2b022dfb57e42565446b1e024314.tar.bz2 rails-3413b88a3d6b2b022dfb57e42565446b1e024314.zip |
Replace map.flatten with flat_map in activerecord
Diffstat (limited to 'activerecord/test/cases/autosave_association_test.rb')
-rw-r--r-- | activerecord/test/cases/autosave_association_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb index d2f97df0fc..9651244372 100644 --- a/activerecord/test/cases/autosave_association_test.rb +++ b/activerecord/test/cases/autosave_association_test.rb @@ -76,9 +76,9 @@ class TestAutosaveAssociationsInGeneral < ActiveRecord::TestCase end def callbacks_for_model(model) - model.instance_variables.grep(/_callbacks$/).map do |ivar| + model.instance_variables.grep(/_callbacks$/).flat_map do |ivar| model.instance_variable_get(ivar) - end.flatten + end end end |