diff options
author | James Lopez <james@jameslopez.es> | 2017-06-15 11:58:29 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-06-23 12:41:41 +0300 |
commit | 968809dc2df1a83519def15068b70886309930c7 (patch) | |
tree | 3aee12cf1358564d07e1dd83fb9c473ede90ba46 /app/controllers/profiles_controller.rb | |
parent | aa158dd73189d643a5bb9cb3e9e5c519991750ac (diff) |
fix profiles controller
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]}" } |