Sha256: 9ba520895ede8a0bc5d779b389ff61c3e513308e49015400f63ac35fc09c59ef
Contents?: true
Size: 691 Bytes
Versions: 71
Compression:
Stored size: 691 Bytes
Contents
# frozen_string_literal: true module Decidim # This class deals with uploading images to Decidim It is intended to just # hold the uploads configuration, so you should inherit from this class and # then tweak any configuration you need. class ApplicationUploader < CarrierWave::Uploader::Base # Override the directory where uploaded files will be stored. # This is a sensible default for uploaders that are meant to be mounted: def store_dir default_path = "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" return File.join(Decidim.base_uploads_path, default_path) if Decidim.base_uploads_path.present? default_path end end end
Version data entries
71 entries across 71 versions & 2 rubygems