Some fixes related to optimized images (#4233)

* FIX: No need to manually include relation.

* FIX: OR instead of chaining relation.
This commit is contained in:
Guo Xiang Tan
2016-05-20 15:12:25 +08:00
committed by Régis Hanol
parent 0cf5a1705a
commit 0634834009
2 changed files with 3 additions and 4 deletions

View File

@@ -41,7 +41,6 @@ class Upload < ActiveRecord::Base
)
if thumbnail
optimized_images << thumbnail
self.width = width
self.height = height
save(validate: false)