Class: Decidim::AvatarUploader

Inherits:
ImageUploader show all
Defined in:
app/uploaders/decidim/avatar_uploader.rb

Overview

This class deals with uploading avatars to a User.

Instance Attribute Summary

Attributes inherited from ApplicationUploader

#content_type_allowlist, #content_type_denylist, #model, #mounted_as, #validable_dimensions

Instance Method Summary collapse

Methods inherited from ImageUploader

#content_type_allowlist, #dimensions_info, #extension_allowlist, #max_image_height_or_width, #validable_dimensions

Methods inherited from ApplicationUploader

#attached?, #initialize, #path, #remote_url=, set_variants, #store_dir, #url, #variant, #variant_path, #variant_url, variants

Constructor Details

This class inherits a constructor from Decidim::ApplicationUploader

Instance Method Details

#default_multiuser_urlObject



18
19
20
# File 'app/uploaders/decidim/avatar_uploader.rb', line 18

def default_multiuser_url(*)
  AssetRouter::Pipeline.new("media/images/avatar-multiuser.png", model:).url
end

#default_urlObject



14
15
16
# File 'app/uploaders/decidim/avatar_uploader.rb', line 14

def default_url(*)
  AssetRouter::Pipeline.new("media/images/default-avatar.svg", model:).url
end