this has been bugging me for ages, broken "fill your profile link" fixed AND bio updates when you save

This commit is contained in:
Sam
2013-04-12 10:07:46 +10:00
parent 04ca4077a7
commit 0f362c5474
4 changed files with 41 additions and 10 deletions

View File

@ -29,7 +29,7 @@ class UsersController < ApplicationController
def update
user = User.where(username_lower: params[:username].downcase).first
guardian.ensure_can_edit!(user)
json_result(user) do |u|
json_result(user, serializer: UserSerializer) do |u|
website = params[:website]
if website
@ -50,7 +50,11 @@ class UsersController < ApplicationController
end
end
u.save
if u.save
u
else
nil
end
end
end