def do_destroy(record)
      record ||= destroy_find_record
      begin
        self.successful = record.destroy
      rescue StandardError => exception
        flash[:warning] = as_(:cant_destroy_record, :record => ERB::Util.h(record.to_label))
        self.successful = false
        logger.warn do
          "\n\n#{exception.class} (#{exception.message}):\n    " +
            Rails.backtrace_cleaner.clean(exception.backtrace).join("\n    ") +
            "\n\n"
        end
      end
    end
def do_destroy(record)
      record ||= destroy_find_record
      begin
        self.successful = record.destroy
      rescue StandardError => exception
        flash[:warning] = as_(:cant_destroy_record, :record => ERB::Util.h(record.to_label))
        self.successful = false
        logger.warn do
          "\n\n#{exception.class} (#{exception.message}):\n    " +
            Rails.backtrace_cleaner.clean(exception.backtrace).join("\n    ") +
            "\n\n"
        end
      end
    end
A simple method to handle the actual destroying of a record
 May be overridden to customize the behavior