Curated list of episodes, bundled to help you on your learning path!
Videos of tech, infrastructure, hardware and software which non-instructional by nature.
Articles around software and tutorials.
Show your love and support while looking fancy.
Got a question or want to chat about a topic? Let's talk!
By the way, in order to use fewer resources in the server, something interesting could be to do the same in the front end using Stimulus.
I think that a full solution around this would be to have a background job which gets triggered on create and whenever the email address is updated to do the gravatar_exists? functionality and then update the user to populate a gravatar_url attribute on the user. Then we could check if the user.gravatar_url? and simply return the image_tag with the user.gravatar_url or display the initials.
In development, all worked at first attempt. But in production, gravatar never was returned.
I realized explicit require is needed. So, I had to add this line at top of app/presenters/avatar_presenter.rb
Found it, why not, in SO: https://stackoverflow.com/questions/42803138/why-rails-app-need-to-require-net-http-after-deploy-to-a-new-server