diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index ffad7d8f..8124e1e8 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -16,7 +16,11 @@ class UserController < ApplicationController def update user_attributes = params.require(:user).permit(:display_name, :profile_picture, :motivation_header, :website, :location, :bio, :crop_x, :crop_y, :crop_w, :crop_h) - unless current_user.update_attributes(user_attributes) + if current_user.update_attributes(user_attributes) + text = 'Your profile has been updated!' + text += ' It might take a few minutes until your new profile picture is shown everywhere.' if user_attributes[:profile_picture] + flash[:success] = text + else flash[:error] = 'An error occurred. ;_;' end redirect_to edit_user_profile_path