Skip to content

Commit

Permalink
Use Pathname#to_path explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
cheezenaan committed Apr 22, 2018
1 parent 481a772 commit 1925113
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Expand Up @@ -12,6 +12,6 @@ def frontend_asset_path(path)
return unless manifest.fetch(path, false)

host = app.config.action_controller.asset_host || app.routes.url_helpers.root_path
Pathname.new(host).join("assets", "frontend", manifest[path])
Pathname.new(host).join("assets", "frontend", manifest[path]).to_path
end
end
1 change: 1 addition & 0 deletions app/helpers/users_helper.rb
Expand Up @@ -7,6 +7,7 @@ def gravatar_for(user, size: 80)
gravatar_id = Digest::MD5.hexdigest(user.email.downcase)
gravatar_url = Pathname.new("https://secure.gravatar.com/avatar/")
.join(gravatar_id, "?s=#{size}")
.to_path
image_tag(gravatar_url, alt: user.name, class: "gravatar")
end
end

0 comments on commit 1925113

Please sign in to comment.