jRails is a drop-in jQuery replacement for Prototype/script.aculo.us on Rails. Using jRails, you can get all of the same default Rails helpers for javascript functionality using the lighter jQuery library.
This release gets all of the most recent changes and updates to the jquery Enchant and jquery UI libraries. I wrote most of the core effects that will ultimately become part of the new jQuery Enchant effect library and these put jquery on par with scriptaculous effects. This release includes some additoinal fixes and updates to RJS. Next release will include jQuery.noConflict!
jRails provides drop-in functionality for these existing Rails methods.
The visual effects in jRails are based on the new jquery-fx library. jRails currently uses a slightly modified version of jquery fx code to get some of the desired effects. This code is evolving and is subject to change. In the meatime, you can get a taste of the visual effects that are currently available.
Appear
Fade
Puff
BlindDown
BlindUp
BlindRight
BlindLeft
SwitchOff
SwitchOn
SlideDown
SlideUp
DropIn
DropOut
Shake
Pulsate
Squish
Fold
FoldOut
Grow
Shrink
Highlight
Just install and go! Once installed, the previous Prototype/script.aculo.us helpers will be replaced by jQuery ones. In order for them to function correctly, just include the appropriate javascript files in the head of your page.
<script src="/javascripts/jquery.js" type="text/javascript"></script> <script src="/javascripts/jquery-ui.js" type="text/javascript"></script> <script src="/javascripts/jquery-fx.js" type="text/javascript"></script> <script src="/javascripts/jrails.js" type="text/javascript"></script>
You can also use the Rails javascript_include_tag helper with :default to load them automagically.
<%= javascript_include_tag :defaults %>
To install the jRails plugin:
./script/plugin install http://ennerchi.googlecode.com/svn/trunk/plugins/jrails
Then copy the javascript files in the plugin folder to your javascripts directory.
You can contact me at aaronchi@gmail.com
Comments, bug reports and feedback are welcomed. I'm also considering developing a similar library for MooTools so if you are interested, please let me know.