diff options
Diffstat (limited to 'app/controllers/profiles_controller.rb')
-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]}" } |