Permalink
Browse files

Use Pathname#to_path explicitly

  • Loading branch information...
cheezenaan committed Apr 22, 2018
1 parent 481a772 commit 1925113c670c6e4af898b4be1232a1d0d933df5a
Showing with 2 additions and 1 deletion.
  1. +1 −1 app/helpers/application_helper.rb
  2. +1 −0 app/helpers/users_helper.rb
@@ -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
@@ -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.