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:
parent
b66f69599a
commit
3883188dcd
13 changed files with 43 additions and 18 deletions
5
db/migrate/20200715034647_add_picture_to_users.rb
Normal file
5
db/migrate/20200715034647_add_picture_to_users.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class AddPictureToUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :users, :picture, :string
|
||||
end
|
||||
end
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2020_07_15_001812) do
|
||||
ActiveRecord::Schema.define(version: 2020_07_15_034647) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
|
@ -591,6 +591,7 @@ ActiveRecord::Schema.define(version: 2020_07_15_001812) do
|
|||
t.boolean "is_admin", default: false
|
||||
t.string "username"
|
||||
t.boolean "is_disabled", default: false
|
||||
t.string "picture"
|
||||
t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
|
||||
t.index ["email"], name: "index_users_on_email", unique: true
|
||||
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue