Sha256: 7543f01780e9e19de5e64e2b7a2c3e58498e0a9969d62266caf290ba65d47097

Contents?: true

Size: 472 Bytes

Versions: 40

Compression:

Stored size: 472 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # This class deals with uploading avatars to a User.
  class AvatarUploader < ImageUploader
    include CarrierWave::MiniMagick

    process :validate_dimensions

    version :big do
      process resize_and_pad: [500, 500]
    end

    version :thumb do
      process resize_and_pad: [100, 100]
    end

    def default_url(*)
      ActionController::Base.helpers.asset_path("decidim/default-avatar.svg")
    end
  end
end

Version data entries

40 entries across 40 versions & 2 rubygems

Version Path
decidim-core-0.8.4 app/uploaders/decidim/avatar_uploader.rb
decidim-core-0.8.3 app/uploaders/decidim/avatar_uploader.rb
decidim-core-0.8.2 app/uploaders/decidim/avatar_uploader.rb
decidim-core-0.8.1 app/uploaders/decidim/avatar_uploader.rb
decidim-core-0.8.0 app/uploaders/decidim/avatar_uploader.rb
decidim-core-0.7.4 app/uploaders/decidim/avatar_uploader.rb
decidim-core-0.7.3 app/uploaders/decidim/avatar_uploader.rb
decidim-core-0.7.2 app/uploaders/decidim/avatar_uploader.rb
decidim-core-0.7.1 app/uploaders/decidim/avatar_uploader.rb
decidim-core-0.7.0 app/uploaders/decidim/avatar_uploader.rb
decidim-core-0.6.8 app/uploaders/decidim/avatar_uploader.rb
decidim-0.6.8 decidim-core/app/uploaders/decidim/avatar_uploader.rb
decidim-core-0.6.7 app/uploaders/decidim/avatar_uploader.rb
decidim-0.6.7 decidim-core/app/uploaders/decidim/avatar_uploader.rb
decidim-core-0.6.6 app/uploaders/decidim/avatar_uploader.rb
decidim-0.6.6 decidim-core/app/uploaders/decidim/avatar_uploader.rb
decidim-core-0.6.5 app/uploaders/decidim/avatar_uploader.rb
decidim-0.6.5 decidim-core/app/uploaders/decidim/avatar_uploader.rb
decidim-core-0.6.4 app/uploaders/decidim/avatar_uploader.rb
decidim-0.6.4 decidim-core/app/uploaders/decidim/avatar_uploader.rb