FIX: automatically growing uploads tree

This commit is contained in:
Régis Hanol
2015-05-28 01:03:24 +02:00
parent 1b96a3acc1
commit 8e7bfd0f29
8 changed files with 38 additions and 46 deletions

View File

@ -3,6 +3,9 @@ require "digest/sha1"
class OptimizedImage < ActiveRecord::Base
belongs_to :upload
# BUMP UP if optimized image algorithm changes
VERSION = 1
def self.create_for(upload, width, height, opts={})
return unless width > 0 && height > 0