Support for removal of old backups automatically via a site setting

This commit is contained in:
Robin Ward
2014-03-11 17:28:12 -04:00
parent cf630207b7
commit dc1d6decf5
8 changed files with 86 additions and 21 deletions

View File

@ -49,9 +49,13 @@ class Admin::BackupsController < Admin::AdminController
end
def destroy
filename = params.fetch(:id)
Backup.remove(filename)
render nothing: true
backup = Backup[params.fetch(:id)]
if backup
backup.remove
render nothing: true
else
render nothing: true, status: 404
end
end
def logs