diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-19 22:53:33 -0700 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-19 22:53:33 -0700 |
commit | edfc7d0d268b6e73a30f501c3897965c111c262a (patch) | |
tree | 7622b159c8013aaebfeccc67b55581f70b6a8a4f | |
parent | b99221e6f076972aafd5967bf2421141b735b065 (diff) | |
parent | 243547616789619b807c8b97f7e534f24d1a268c (diff) | |
download | gitlab-ce-edfc7d0d268b6e73a30f501c3897965c111c262a.tar.gz |
Merge pull request #8974 from duduribeiro/add_error_message_in_profile
Add error message when have error on profile screen
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/controllers/profiles_controller.rb | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG index c96ecc5726e..f38a075fff5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -12,6 +12,7 @@ v 7.10.0 (unreleased) - Fix alignment of navbar toggle button (Cody Mize) - Identical look of selectboxes in UI - Move "Import existing repository by URL" option to button. + - Improve error message when save profile has error. v 7.9.0 (unreleased) - Add HipChat integration documentation (Stan Hu) diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb index 1b9a86ee42c..3c7f45d559b 100644 --- a/app/controllers/profiles_controller.rb +++ b/app/controllers/profiles_controller.rb @@ -25,7 +25,8 @@ class ProfilesController < ApplicationController if @user.update_attributes(user_params) flash[:notice] = "Profile was successfully updated" else - flash[:alert] = "Failed to update profile" + messages = @user.errors.full_messages.uniq.join('. ') + flash[:alert] = "Failed to update profile. #{messages}" end respond_to do |format| |