Module: Hippo::Concerns::AssetUploader::LocationHash::InstanceMethods

Defined in:
lib/hippo/concerns/asset_uploader.rb

Constant Summary collapse

CHAR_CHOICES =
[*('a'..'z'),*('0'..'9')]

Instance Method Summary collapse

Instance Method Details

#generate_location(io, context) ⇒ Object


11
12
13
14
15
# File 'lib/hippo/concerns/asset_uploader.rb', line 11

def generate_location(io, context)
    basename, _ = super.split("/")
    path = Array.new(3){ CHAR_CHOICES.shuffle[0,4].join }
    path.push(basename).join('/')
end