diff options
author | James Lopez <james@jameslopez.es> | 2017-06-15 10:58:29 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-06-23 11:41:41 +0200 |
commit | 968809dc2df1a83519def15068b70886309930c7 (patch) | |
tree | 3aee12cf1358564d07e1dd83fb9c473ede90ba46 | |
parent | aa158dd73189d643a5bb9cb3e9e5c519991750ac (diff) | |
download | gitlab-ce-968809dc2df1a83519def15068b70886309930c7.tar.gz |
fix profiles controller
-rw-r--r-- | app/controllers/profiles_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb index 65098f2f223..9f596c3dc9c 100644 --- a/app/controllers/profiles_controller.rb +++ b/app/controllers/profiles_controller.rb @@ -14,7 +14,7 @@ class ProfilesController < Profiles::ApplicationController respond_to do |format| result = Users::UpdateService.new(current_user, @user, user_params).execute - if result[:success] + if result[:status] == :success message = "Profile was successfully updated" format.html { redirect_back_or_default(default: { action: 'show' }, options: { notice: message }) } @@ -65,7 +65,7 @@ class ProfilesController < Profiles::ApplicationController def update_username result = Users::UpdateService.new(current_user, @user, username: user_params[:username]).execute - options = if result[:success] + options = if result[:status] == :success { notice: "Username successfully changed" } else { alert: "Username change failed - #{result[:message]}" } |