diff options
author | James Lopez <james@jameslopez.es> | 2017-06-15 15:24:37 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-06-23 11:41:41 +0200 |
commit | 04bb82c8b8cb3033c805ea5158b01c09284ac3db (patch) | |
tree | 4cbf0d64425b8ff2ead9796b792f63dfc3d68051 /app/controllers/profiles | |
parent | 949808529c3d7947279eb8ff89f9644fc8505550 (diff) | |
download | gitlab-ce-04bb82c8b8cb3033c805ea5158b01c09284ac3db.tar.gz |
update preferences controller
Diffstat (limited to 'app/controllers/profiles')
-rw-r--r-- | app/controllers/profiles/preferences_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/profiles/preferences_controller.rb b/app/controllers/profiles/preferences_controller.rb index 5414142e2df..6845256e9d8 100644 --- a/app/controllers/profiles/preferences_controller.rb +++ b/app/controllers/profiles/preferences_controller.rb @@ -6,7 +6,9 @@ class Profiles::PreferencesController < Profiles::ApplicationController def update begin - if @user.update_attributes(preferences_params) + result = Users::UpdateService.new(current_user, user, preferences_params).execute + + if result[:status] == :success flash[:notice] = 'Preferences saved.' else flash[:alert] = 'Failed to save preferences.' |