Support Users Directly Uploading Profile Pictures.

* Adds a `picture` attribute to `User`.
* Preserves Gravatar as a fallback option.
* Now, you should use `user.profile_picturer` instead of `gravatar_url`
* TODO: Ensure `profile_picture` handles sizing right for uploaded images.
This commit is contained in:
Michael Ball 2020-07-14 21:06:15 -07:00
parent b66f69599a
commit 3883188dcd
13 changed files with 43 additions and 18 deletions

View file

@ -145,7 +145,7 @@
Registered
= word_pluralize(@conference.participants.count, 'Attendee')
- @conference.participants.each do |participant|
= link_to image_tag(participant.gravatar_url(size: '25'), title: "#{participant.name}!", class: 'img-circle'), user_path(participant)
= link_to image_tag(participant.profile_picture(size: '25'), title: "#{participant.name}!", class: 'img-circle'), user_path(participant)
.col-md-4.col-md-offset-2
- if @conference.program.speakers.confirmed.any?
%h4
@ -156,4 +156,4 @@
Confirmed
= word_pluralize(@conference.program.speakers.confirmed.count, 'Speaker')
- @conference.program.speakers.confirmed.each do |speaker|
= link_to image_tag(speaker.gravatar_url(size: '25'), title: "#{speaker.name}!", class: 'img-circle'), user_path(speaker)
= link_to image_tag(speaker.profile_picture(size: '25'), title: "#{speaker.name}!", class: 'img-circle'), user_path(speaker)