Ruby on Rails

Ruby On Rails features complete Prototype, and script.aculo.us integration.

Demo site and example code

Visit the Rails/script.aculo.us demo site for live demos and example code.

Usage

First, you need to include the libraries in your app, which is easy, as Prototype and script.aculo.us come prepackaged with Rails.

In your layout or view add this to the <head> section of your layout:


<%= javascript_include_tag :defaults %>

You can now use the Rails JavaScript helpers or use do-it-yourself <script> tags and inline events as documented in this Wiki.

As of Rails 2.0, for certain functionality, like autocompleting text fields and in place editing, you’ll need to install the correspoding plugins.

Related Articles