For a rational number to generate a repeating decimal, the correct condition is:
The denominator must not evenly divide any power of 10.
This means that if the denominator (when in simplest form) has prime factors other than 2 and 5, the decimal representation of the fraction will be repeating. If it only has the prime factors of 2 and 5, it will terminate.