diff options
author | Carlos Ribeiro <duduribeiro.gba@gmail.com> | 2015-03-18 23:18:35 -0300 |
---|---|---|
committer | Carlos Ribeiro <duduribeiro.gba@gmail.com> | 2015-03-19 23:31:25 -0300 |
commit | 243547616789619b807c8b97f7e534f24d1a268c (patch) | |
tree | 7622b159c8013aaebfeccc67b55581f70b6a8a4f /app/controllers/profiles_controller.rb | |
parent | b99221e6f076972aafd5967bf2421141b735b065 (diff) | |
download | gitlab-ce-243547616789619b807c8b97f7e534f24d1a268c.tar.gz |
Add error message when have error on profile screen
Diffstat (limited to 'app/controllers/profiles_controller.rb')
-rw-r--r-- | app/controllers/profiles_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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| |