mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 12:19:52 +01:00
Ensure errors display when updating profile images
This commit is contained in:
parent
2721e050c6
commit
4df74d6ff5
1 changed files with 3 additions and 2 deletions
|
@ -12,9 +12,10 @@ class Settings::ProfilePictureController < ApplicationController
|
|||
text += t(".notice.profile_header") if user_attributes[:profile_header]
|
||||
flash[:success] = text
|
||||
else
|
||||
flash[:error] = t(".error")
|
||||
# CarrierWave resets the image to the default upon an error
|
||||
current_user.reload
|
||||
end
|
||||
|
||||
redirect_to settings_profile_path
|
||||
render "settings/profile/edit"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue