In my physics textbook (Resnick, Halliday, Walker) , it is given that the direction of force of static friction acting on a wheel undergoing pure rolling without sliding on the ground and whose centre of mass is accelerating uniformly, is the same as the direction of acceleration of COM. However when a ball sliding down a ramp is considered, the direction is given opposite to the acceleration( up the ramp) , the reason given that the wheel has a tendency to slide down the ramp and friction must oppose this tendency. I find that the first scenario is only a generalisation of the second with a=g . But then why is the direction of friction different? Or is one of these assertions wrong ?