2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

FIX: cleanup old letter avatars if needed

FEATURE: use image magick version as a key for letter avatars
This commit is contained in:
Sam 2015-04-07 13:03:43 +10:00
parent f909233ed5
commit 5d31290dbc
4 changed files with 43 additions and 3 deletions

View file

@ -24,7 +24,7 @@ class UserAvatarsController < ApplicationController
params.require(:version)
params.require(:size)
return render_dot if params[:version].to_i > LetterAvatar::VERSION
return render_dot if params[:version] != LetterAvatar.version
image = LetterAvatar.generate(params[:username].to_s, params[:size].to_i)