Module Massage
In: massage/lib/massage.rb
Authors:Kang-min Liu (gugod@gugod.org), Lukhnos D. Liu (lukhnos@handlino.com)
Copyright:Copyright (c) 2007 Handlino Inc.
License:Distributed under the New BSD License

Massage is a plugin that makes it very easy to turn your Rails App Into a "single page application" (SPA). An SPA is a Google Mail-like application, in which every controller action is rendered in an HTML element, instead of requiring the flushing of the entire HTML document (ie. page loading).

To enable SPA, simply install the plug-in, and add this line:

  spa :only => [:index, :settings]    # or :except => [...]

Then when action index or settings is requested as an XHR, the plug-in knows the strip the layout and only render the content into a designated element ("content" by default; changeable).

massage makes use of RJS to enable the SPA techniques. RJS by default requires prototype.js to be included. So make sure it‘s there in your template or layout code.

Classes and Modules

Module Massage::InstanceMethods

[Validate]