From 1c18490141df2a35be812b35f10e21ab756ba7b6 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 5 Jul 2013 16:09:43 -0400 Subject: [PATCH] Revert "cheat to fix duplicate key on thumbnails" This reverts commit 0c702522c4a7f4923e071a2e16947f7d910c226b. --- app/models/upload.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/models/upload.rb b/app/models/upload.rb index 504da4c8556..81731a89c3d 100644 --- a/app/models/upload.rb +++ b/app/models/upload.rb @@ -34,11 +34,6 @@ class Upload < ActiveRecord::Base return unless width > SiteSetting.auto_link_images_wider_than return if has_thumbnail? thumbnail = OptimizedImage.create_for(self, width, height) - # TODO: @regis we may want to do the more cleanly, create_for may change the dimensions - # this avoids a duplicate key, it should be done more cleanly, this is cheating - thumbnail.width = width - thumbnail.height = height - optimized_images << thumbnail if thumbnail end