For a rational number to generate a repeating decimal, the correct condition is:
The denominator must not evenly divide any power of 10.
In other words, if you reduce the fraction to its simplest form and the denominator has prime factors other than 2 and 5, the decimal representation will be repeating. If the denominator only has the prime factors 2 and 5, the decimal representation will be terminating.