Permalink
Browse files

Revert "use File.basename to get the filename minus .yml"

This reverts commit 00c5342.

Conflicts:
	activerecord/lib/active_record/fixtures.rb
  • Loading branch information...
1 parent 7f96e43 commit 8e44c93b4c0e4b1bdd0fca13b79f5be1088d6959 @tenderlove tenderlove committed Dec 18, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 activerecord/lib/active_record/fixtures.rb
@@ -751,11 +751,10 @@ def set_fixture_class(class_names = {})
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

0 comments on commit 8e44c93

Please sign in to comment.