Whenever you see Gomer in a deputy outfit (even on a temporary basis), you know you've got a desperate situation on your hands.
For the most part, Gomer is sworn in on special occasions like parades and the time there was a flood. But sometimes he's called upon to help guard prisoners and then catch them when they escape, which they inevitably will do.