Ruby on Rails - Temporary Profile Pic from Gravatar Gem - Ruby 3.1.2 & Rails 7 (Tagalog) - by iprog21

Description

Ruby on Rails - Temporary Profile Pic from Gravatar Gem - Ruby 3.1.2 & Rails 7 (Tagalog)

iprog21 demonstrated how to integrate a temporary profile picture that can be used for the user's profile image when they sign in. The picture is from the Gravatar website; make sure they are registered and upload their profile image on that website. This is very useful if you don't have the upload feature yet. By using the user's email, Rails can get the image uploaded from the Gravatar website. Devise gem is used for getting the user object to get their email.

Useful Links:

Gravatar Website: https://en.gravatar.com/
Gravatar Gem: https://rubygems.org/gems/gravatar_image_tag/versions/1.2.0
Devise Gem: https://github.com/heartcombo/deviseĀ 
Gsub Technique - https://apidock.com/ruby/String/gsub

Comments