Sha256: bf4589e5a5ec1bedc41ea7fcd90573002a04279965f6b7fe3cce0d7054d1876b
Contents?: true
Size: 574 Bytes
Versions: 8
Compression:
Stored size: 574 Bytes
Contents
# frozen_string_literal: true module Decidim # This class deals with uploading avatars to a User. class AvatarUploader < ImageUploader set_variants do { profile: { resize_to_fill: [536, 640] }, big: { resize_to_fit: [80, 80] }, thumb: { resize_to_fit: [40, 40] } } end def default_url(*) AssetRouter::Pipeline.new("media/images/default-avatar.svg", model: model).url end def default_multiuser_url(*) AssetRouter::Pipeline.new("media/images/avatar-multiuser.png", model: model).url end end end
Version data entries
8 entries across 8 versions & 1 rubygems