This commit is contained in:
Stella Rouzi 2015-10-17 16:57:48 +03:00
parent 2e692f7ea5
commit 01086813af
37 changed files with 221 additions and 190 deletions

View file

@ -28,9 +28,11 @@ module Admin
end
if @user.update_attributes(params[:user])
redirect_to admin_users_path, notice: "Updated #{@user.name} (#{@user.email})!" + message
flash[:notice] = "Updated #{@user.name} (#{@user.email})!" + message
redirect_to admin_users_path
else
redirect_to admin_users_path, alert: "Could not update #{@user.name} (#{@user.email}). #{@user.errors.full_messages.join('. ')}."
flash[:error] = "Could not update #{@user.name} (#{@user.email}). #{@user.errors.full_messages.join('. ')}."
render :edit
end
end