Commit edfc7d0d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #8974 from duduribeiro/add_error_message_in_profile

Add error message when have error on profile screen
parents b99221e6 24354761
...@@ -12,6 +12,7 @@ v 7.10.0 (unreleased) ...@@ -12,6 +12,7 @@ v 7.10.0 (unreleased)
- Fix alignment of navbar toggle button (Cody Mize) - Fix alignment of navbar toggle button (Cody Mize)
- Identical look of selectboxes in UI - Identical look of selectboxes in UI
- Move "Import existing repository by URL" option to button. - Move "Import existing repository by URL" option to button.
- Improve error message when save profile has error.
v 7.9.0 (unreleased) v 7.9.0 (unreleased)
- Add HipChat integration documentation (Stan Hu) - Add HipChat integration documentation (Stan Hu)
......
...@@ -25,7 +25,8 @@ class ProfilesController < ApplicationController ...@@ -25,7 +25,8 @@ class ProfilesController < ApplicationController
if @user.update_attributes(user_params) if @user.update_attributes(user_params)
flash[:notice] = "Profile was successfully updated" flash[:notice] = "Profile was successfully updated"
else else
flash[:alert] = "Failed to update profile" messages = @user.errors.full_messages.uniq.join('. ')
flash[:alert] = "Failed to update profile. #{messages}"
end end
respond_to do |format| respond_to do |format|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment