Most of the last chapter dealt with the Rails helpers that interact with Prototype. In this chapter, we'll shift attention to script.aculo.us, and the Rails helpers that use it. script.aculo.us provides eye-catching visual effects and transitions and powerful drag-and-drop elements.
We'll put the examples for this chapter into a new controller, so from your Rails project directory, run the generator:
script/generate controller chapter4 index
If you already created an application-wide layout (layouts/application.rhtml) and CSS file (public/stylesheets/application.css) from the beginning of Chapter 3, they will automatically be used for this controller as well.
Now let's take a look at what script.aculo.us is most famous for: its visual effects.