Sha256: ec84dd83750d19ebfcfcd1bee17a976d0bcdc5e66bcfd94d3e40ea007a055b4d
Contents?: true
Size: 410 Bytes
Versions: 57
Compression:
Stored size: 410 Bytes
Contents
# frozen_string_literal: true require 'carrierwave' class ApplicationUploader < CarrierWave::Uploader::Base storage :file def store_dir "system/uploads/#{model.class.model_name.to_s.underscore}/#{mounted_as}/#{id_directory}" end private def id_directory if model.respond_to?(:uuid) model.reload unless model.uuid.present? model.uuid else model.id end end end
Version data entries
57 entries across 57 versions & 2 rubygems