X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/11cc4a5e601dd288d601e6e35a72d159062f18b5..6da536e5c8870cb30594a7397e074803080e2708:/app/controllers/users_controller.rb diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 17031848d..8c234006e 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -660,15 +660,15 @@ class UsersController < ApplicationController user.languages = params[:user][:languages].split(",") - case params[:image_action] + case params[:avatar_action] when "new" then - user.image = params[:user][:image] + user.avatar.attach(params[:user][:avatar]) user.image_use_gravatar = false when "delete" then - user.image = nil + user.avatar.purge user.image_use_gravatar = false when "gravatar" then - user.image = nil + user.avatar.purge user.image_use_gravatar = true end