Carrierwave recommends overriding store_dir
in the uploader, but it only gives you a way to modify the directory name, not the whole path with the file name. Overriding store_path
let's you modify the entire path.
def store_path(for_file = filename)
self.model.class.name.underscore.pluralize + "/" + self.model.slug + "/" + (version_name || :original).to_s + ".jpg"
end
This is the original: