diff options
author | Arthur Nogueira Neves <github@arthurnn.com> | 2016-09-13 13:21:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-13 13:21:28 -0400 |
commit | c49751be1f528a258572c7ecce8e066807352528 (patch) | |
tree | 74d4d9599a8abb808253412a48e6c6239f533a54 /activerecord/lib | |
parent | 16b1816b1ac2204ec8a88436b8b170d0356ee8e5 (diff) | |
parent | 1b128f89748c7cf12481684e473f7c884993055f (diff) | |
download | rails-c49751be1f528a258572c7ecce8e066807352528.tar.gz rails-c49751be1f528a258572c7ecce8e066807352528.tar.bz2 rails-c49751be1f528a258572c7ecce8e066807352528.zip |
Merge pull request #26466 from y-yagi/remove_duplicated_fixture_set_names
remove duplicated fixture set names
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/fixtures.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 40a9aa2783..8b47fbdbe4 100644 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -902,7 +902,7 @@ module ActiveRecord def fixtures(*fixture_set_names) if fixture_set_names.first == :all - fixture_set_names = Dir["#{fixture_path}/{**,*}/*.{yml}"] + fixture_set_names = Dir["#{fixture_path}/{**,*}/*.{yml}"].uniq fixture_set_names.map! { |f| f[(fixture_path.to_s.size + 1)..-5] } else fixture_set_names = fixture_set_names.flatten.map(&:to_s) |