Sha256: 107ebc9236186376e1df44a1c5b15f48c7feb243328e6a9277a9d4708bdd3890
Contents?: true
Size: 586 Bytes
Versions: 5
Compression:
Stored size: 586 Bytes
Contents
# frozen_string_literal: true module Decidim # This class deals with uploading avatars to a User. class AvatarUploader < ImageUploader process :validate_dimensions version :profile do process resize_to_fill: [536, 640] # double the size, for retina displays end version :big, from_version: :profile do process resize_to_fit: [80, 80] end version :thumb, from_version: :big do process resize_to_fit: [40, 40] end def default_url(*) ActionController::Base.helpers.asset_path("decidim/default-avatar.svg") end end end
Version data entries
5 entries across 5 versions & 1 rubygems