aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-12-18 11:26:57 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2012-12-18 11:27:16 -0800
commit8e44c93b4c0e4b1bdd0fca13b79f5be1088d6959 (patch)
treea25269cc136fbd48828012988741c67ae27ac8d7 /activerecord
parent7f96e4317e1354852e9600becb16662de3c17691 (diff)
downloadrails-8e44c93b4c0e4b1bdd0fca13b79f5be1088d6959.tar.gz
rails-8e44c93b4c0e4b1bdd0fca13b79f5be1088d6959.tar.bz2
rails-8e44c93b4c0e4b1bdd0fca13b79f5be1088d6959.zip
Revert "use File.basename to get the filename minus .yml"
This reverts commit 00c5342d96a3677c0a6a2bb8316c76182f5bdfdd. Conflicts: activerecord/lib/active_record/fixtures.rb
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/fixtures.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb
index c5ad14722e..4ed2f93e82 100644
--- a/activerecord/lib/active_record/fixtures.rb
+++ b/activerecord/lib/active_record/fixtures.rb
@@ -751,11 +751,10 @@ module ActiveRecord
self.fixture_class_names = self.fixture_class_names.merge(class_names.stringify_keys)
end
- def fixtures(*fixture_set_names)
+ def fixtures(*fixture_names)
if fixture_set_names.first == :all
- fixture_set_names = Dir["#{fixture_path}/**/*.yml"].map { |f|
- File.basename f, '.yml'
- }
+ fixture_set_names = Dir["#{fixture_path}/**/*.{yml}"]
+ fixture_set_names.map! { |f| f[(fixture_path.size + 1)..-5] }
else
fixture_set_names = fixture_set_names.flatten.map { |n| n.to_s }
end