module CarrierWave::Uploader::Versions

Implements a different name pattern for versions than CarrierWave's default: we expect the version name at the end of the filename separated by a dash

Private Instance Methods

full_filename(for_file) click to toggle source

put version at the end of the filename

Calls superclass method
# File lib/carrier_wave/file_card_uploader.rb, line 264
def full_filename for_file
  name = super(for_file)
  parts = name.split "."
  basename = [parts.shift, version_name].compact.join("-")
  "#{basename}.#{parts.join('.')}"
end