Sha256: 5f057751cee709095f5bdaa278cc99e64801ed680aa69efe76e2fe7a500750f0
Contents?: true
Size: 865 Bytes
Versions: 9
Compression:
Stored size: 865 Bytes
Contents
# frozen_string_literal: true module Archangel ## # Logo uploader # class LogoUploader < ApplicationUploader process resize_to_fit: [512, 512] version :large do process resize_to_fit: [256, 256] end version :medium, from_version: :large do process resize_to_fit: [128, 128] end version :small, from_version: :medium do process resize_to_fit: [64, 64] end version :tiny, from_version: :small do process resize_to_fit: [32, 32] end ## # Uploaded path for file # # @return [String] upload path # def default_path "archangel/fallback/" + [version_name, "logo.png"].compact.join("_") end ## # Uploaded file name # # @return [String] file name # def filename "logo.#{file.extension}" if original_filename.present? end end end
Version data entries
9 entries across 9 versions & 1 rubygems