Screw it, don't choose columns.

This commit is contained in:
Robin Ward 2013-08-14 12:26:31 -04:00
parent a05ffafd4c
commit aec929b184
1 changed files with 1 additions and 2 deletions

View File

@ -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)