Browser/Feature Detection for Rails/AJAX apps

With the Protoype library supporting only specific browers (i.e. not
IE 5.x), I wondering if anyone can shed light on how they are doing
detection for compatiable browsers in their Rails applications?

Cheers,
Nicholas