To prevent a rat infestation, gardeners should take measures to ensure that items such as bird feeders, pet food, compost bins, and root vegetables are stored securely and away. However, there is a certain plant that can help with the job too.