It really depends. Is it a snow or rock ridge, how long is that section, can you place protection or are there bolts? In the alps many popular routes have been bolted to some degree at critical sections. The Matterhorn is a good example of this. Lion ridge has a lot of bolted protection and also fixed ropes whose anchors can be used to belay. (I have not done Hörnli Ridge, but the topo lists protection there as well).
If it is possible to place protection you can either belay pitch by pitch which is the safest option but slow and therefore only suited for short sections. If you have a longer section and protection is easy to find/place, a running belay is a good option that prevents you falling to death, although serious injury is still likely.
On snow ridges it is typically not possible to place protection. There is no rock to place anything and ice screws will not hold on snow. In this case there is a special technique of going roped and jumping to the other side when one member falls. This is already a pretty high risk technique. Apart from the psychological issue (will you really jump into the abyss?) there is the problem of reacting in time, especially if the second member of a team falls (which the first member often cannot see). This is not to be confused with shortroping which aims at preventing a stumble turning into a fall in the first place. Both techniques require a lot of practice and still carry high risk for the whole team. Therefore this is a technique that I do not use personally.
The last available option is going unroped at such ridges. This does not allow for any error on an individual level, but it removes the risk for the second member of the team. It is only suited if all members of the team feel comfortable with the difficulty of the climb.
In practive, we alternate between going unroped and and a running belay, with rare occasions where we switch to belay for a single pitch or two.