  def destroy
    Log.add_info(request, params.inspect)

    return unless request.post?

    if params[:check_equipment].nil?
      list
      render(:action => 'list')
      return
    end

    count = 0
    params[:check_equipment].each do |equipment_id, value|
      SqlHelper.validate_token([equipment_id])
      if value == '1'
        Equipment.delete(equipment_id)

        count += 1
      end
    end
    flash[:notice] = count.to_s + t('equipment.deleted')
    list
    render(:action => 'list')
  end
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.