Permalink
Browse files

use top level file constant for join, etc

  • Loading branch information...
1 parent ad3f0ee commit 74c5f65bfb7813cecb3a1e78b522de4586e76ac9 @tenderlove tenderlove committed May 10, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 activerecord/lib/active_record/fixtures.rb
@@ -478,7 +478,7 @@ def self.create_fixtures(fixtures_directory, table_names, class_names = {})
connection,
table_name,
class_names[table_name.to_sym] || table_name.classify,
- File.join(fixtures_directory, path))
+ ::File.join(fixtures_directory, path))
end
all_loaded_fixtures.update(fixtures_map)
@@ -656,9 +656,9 @@ def column_names
end
def read_fixture_files
- if File.file?(yaml_file_path)
+ if ::File.file?(yaml_file_path)
read_yaml_fixture_files
- elsif File.file?(csv_file_path)
+ elsif ::File.file?(csv_file_path)
read_csv_fixture_files
else
raise FixturesFileNotFound, "Could not find #{yaml_file_path} or #{csv_file_path}"
@@ -713,7 +713,7 @@ def csv_file_path
end
def yaml_fixtures_key(path)
- File.basename(@fixture_path).split(".").first
+ ::File.basename(@fixture_path).split(".").first
end
def parse_yaml_string(fixture_content)

0 comments on commit 74c5f65

Please sign in to comment.