Skip to content

Commit

Permalink
fix display_path, especially for Heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
dgynn committed Feb 12, 2018
1 parent fecaf4e commit 08321f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/helpers/tuttle/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def display_path(path)
return if path.blank?
display_location =
if path.start_with?(Rails.root.to_s)
path.gsub(Rails.root.to_s, "$RAILS_ROOT")
path.sub(Rails.root.to_s, "$RAILS_ROOT")
elsif File.realpath(path).start_with?(File.realpath(Bundler.rubygems.gem_dir))
File.realpath(path).gsub(BUNDLER_GEM_PATHS_REGEX, "$GEMS")
File.realpath(path).sub(BUNDLER_GEM_PATHS_REGEX, "$GEMS")
else
path
end
Expand Down

0 comments on commit 08321f0

Please sign in to comment.