Skip to content
Snippets Groups Projects
Commit 31acc100 authored by Marcela Ribeiro de Oliveira's avatar Marcela Ribeiro de Oliveira
Browse files

now remove a non empty directory

parent 86fc8d51
No related branches found
No related tags found
No related merge requests found
require 'fileutils'
namespace :attachment_maintaining_service do
desc 'Removing 10 attachments'
task remove_attachments: :environment do
m = sort_directories.first(10)
m.each do |mm|
rmdir(mm)
puts (mm)
FileUtils.rm_r(mm)
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment