Skip to content
Snippets Groups Projects
Commit 2d52f7e2 authored by Oleg Valter's avatar Oleg Valter
Browse files

UsersController#update_profile should allow partial updates

parent d7663800
Branches
Tags
No related merge requests found
......@@ -388,8 +388,14 @@ class UsersController < ApplicationController
end
end
if params[:user][:profile_markdown].present?
profile_rendered = helpers.post_markdown(:user, :profile_markdown)
if @user.update(profile_params.merge(profile: profile_rendered))
profile_params = profile_params.merge(profile: profile_rendered)
end
status = @user.update(profile_params)
if status
flash[:success] = 'Your profile details were updated.'
redirect_to user_path(current_user)
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment