Skip to content
Permalink
Browse files
Use Rails.root.join directly
  • Loading branch information
joemasilotti committed Mar 15, 2023
1 parent f815830 commit 4474663
Showing 1 changed file with 3 additions and 3 deletions.
@@ -90,16 +90,16 @@ def attach_avatar(record, avatars)
end

def location_seeds
@location_seeds ||= YAML.load_file(File.join(Rails.root, "db", "seeds", "locations.yml"))
@location_seeds ||= YAML.load_file(Rails.root.join("db", "seeds", "locations.yml"))
end

def developer_avatar_urls
@developer_avatar_urls ||= YAML.load_file(File.join(Rails.root, "db", "seeds", "avatars.yml"))
@developer_avatar_urls ||= YAML.load_file(Rails.root.join("db", "seeds", "avatars.yml"))
.map { |image_id| unsplash_url_for(image_id) }
end

def business_avatar_urls
@business_avatar_urls ||= YAML.load_file(File.join(Rails.root, "db", "seeds", "business_avatars.yml"))
@business_avatar_urls ||= YAML.load_file(Rails.root.join("db", "seeds", "business_avatars.yml"))
.map { |image_id| unsplash_url_for(image_id) }
end

0 comments on commit 4474663

Please sign in to comment.