diff --git a/CHANGELOG b/CHANGELOG index c96ecc5726e71775c9fabd798fb509d4d67c5c89..f38a075fff56f871b36f9f0816cbb32ea7076638 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 1b9a86ee42c4482d30e57934faec04fdee8e6949..3c7f45d559b5e7bdbd35e8659c74c7cf9b72f92d 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|