From aec929b1844eed6c8bbe2949496f26414c26882e Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 14 Aug 2013 12:26:31 -0400 Subject: [PATCH] Screw it, don't choose columns. --- app/controllers/users_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 76dfa537991..4137f24b311 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -320,8 +320,7 @@ class UsersController < ApplicationController # [LEGACY] avatars in quotes/oneboxes might still be pointing to this route # fixing it requires a rebake of all the posts def avatar - user = User.select([:email, :use_uploaded_avatar, :uploaded_avatar_template, :uploaded_avatar_id]) - .where(username_lower: params[:username].downcase).first + user = User.where(username_lower: params[:username].downcase).first if user.present? size = determine_avatar_size(params[:size]) url = user.avatar_template.gsub("{size}", size.to_s)