Most rodents love dog food. No matter where the rats are coming from (e.g. your neighbor's yard, your yard, adjacent areas), the rats are there because they have found food. ... This gives your dog enough time to eat without making it available to the rats. Be sure to store the bag of food in a sealable container.