diff --git a/app/models/file_manager_setting.rb b/app/models/file_manager_setting.rb index 2b7a4ad..dac6926 100644 --- a/app/models/file_manager_setting.rb +++ b/app/models/file_manager_setting.rb @@ -231,6 +231,9 @@ class FileManagerSetting self.modules_saved_info = models_dict self.modules_keys = modules_info.keys self.save + if self.class.all.count > 1 + self.class.where(:id.ne=> self.id).destroy + end modules_info.each do |module_key, uploaders| # module_app = ModuleApp.where(:key=> module_key).first # I18n.t("module_name.#{module_key}")