Skip to content

Commit 74c5f65

Browse files
committed
use top level file constant for join, etc
1 parent ad3f0ee commit 74c5f65

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

activerecord/lib/active_record/fixtures.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ def self.create_fixtures(fixtures_directory, table_names, class_names = {})
478478
connection,
479479
table_name,
480480
class_names[table_name.to_sym] || table_name.classify,
481-
File.join(fixtures_directory, path))
481+
::File.join(fixtures_directory, path))
482482
end
483483

484484
all_loaded_fixtures.update(fixtures_map)
@@ -656,9 +656,9 @@ def column_names
656656
end
657657

658658
def read_fixture_files
659-
if File.file?(yaml_file_path)
659+
if ::File.file?(yaml_file_path)
660660
read_yaml_fixture_files
661-
elsif File.file?(csv_file_path)
661+
elsif ::File.file?(csv_file_path)
662662
read_csv_fixture_files
663663
else
664664
raise FixturesFileNotFound, "Could not find #{yaml_file_path} or #{csv_file_path}"
@@ -713,7 +713,7 @@ def csv_file_path
713713
end
714714

715715
def yaml_fixtures_key(path)
716-
File.basename(@fixture_path).split(".").first
716+
::File.basename(@fixture_path).split(".").first
717717
end
718718

719719
def parse_yaml_string(fixture_content)

0 commit comments

Comments
 (0)