Now within your views you can call the visual_effect method to accomplish the DHTML tricks found in the script.aculo.us library.
Heres an example of the "highlight" effect:
Here is some important text, it will be highlighted when the page loads.
Heres an example of the "fade" effect:
Here is some old text, it will fade away when the page loads.
The sample code snippets above are triggered when the page loads, because they e enclosed in tags. In a real application, youll probably display text effects in response to user actions: deleted items might fade away, or the selection of one item might highlight related items. Heres an image that gets squished when you click the link below it:
<%=link_to_function("Squish the bug!", visual_effect(:squish, "to-squish"))%>
The following table lists many of the effects available in Rails 1.0.
Date and Time
Files and Directories
Code Blocks and Iteration
Objects and Classes8
Modules and Namespaces
Reflection and Metaprogramming
XML and HTML
Graphics and Other File Formats
Databases and Persistence
Web Development Ruby on Rails
Web Services and Distributed Programming
Testing, Debugging, Optimizing, and Documenting
Packaging and Distributing Software
Automating Tasks with Rake
Multitasking and Multithreading
Extending Ruby with Other Languages