discourse/app/models/optimized_image.rb
2013-06-17 02:49:34 +02:00

8 lines
160 B
Ruby

class OptimizedImage < ActiveRecord::Base
belongs_to :upload
def filename
"#{sha[0..2]}/#{sha[3..5]}/#{sha[6..16]}_#{width}x#{height}#{ext}"
end
end