O'Reilly logo

CoffeeScript Programming with jQuery, Rails, and Node.js by Michael Erasmus

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Rails and JavaScript

For a long time, Rails was shipped with the Prototype.js and Script.aculo.us JavaScript libraries for AJAX, page animation, and effects.

Rails has the concept of view helpers—these are Ruby methods that can be used in views to abstract away common HTML constructs. Many of the view helpers that deal with client-side code and AJAX were built on top of these two frameworks, and thus they were completely baked in the framework without an easy way of using alternatives.

Prototype.js shares many of the same ideas and goals as jQuery, but over time, jQuery has grown to be perceived as a more elegant and powerful library by many programmers.

As jQuery became more popular, many developers in the Rails community started experimenting by ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required