We played around with script.aculo.us independently of Rails, then we started autogenerating it with helpers. Then, we did the same with Prototype. Finally, we used them in tandem in RJS templates. (Both of these Javascript libraries are spinoffs hosted in the Rails repository).