TRIVIAL: do not remove backups in development

This commit is contained in:
Régis Hanol 2014-08-20 18:58:58 +02:00
parent 8a20d05ba5
commit 054ae8bc13

View File

@ -65,6 +65,7 @@ class Backup
end
def self.remove_old
return if Rails.env.development?
all_backups = Backup.all
return unless all_backups.size > SiteSetting.maximum_backups
all_backups[SiteSetting.maximum_backups..-1].each(&:remove)