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

@ -24,8 +24,8 @@ class UsersController < ApplicationController
private
# Only allow a trusted parameter "white list" through.
def user_params
params.require(:user).permit(:name, :biography, :nickname, :affiliation)
end
def user_params
params.require(:user).permit(:name, :biography, :nickname, :affiliation,
:picture, :picture_cache)
end
end