js_message standardizes javascript interaction between the front end (html) and a rails application.
See this blog post: http://paydrotalks.com/posts/45-standard-json-response-for-rails-and-jquery
In your Rails 3 Gemfile
add:
gem "js_message"
Then run the following rake task and follow the instructions:
rake js_message:install
You're all set!
MIT: https://github.com/paydro/js_message/blob/master/LICENSE
Peter Bui [email protected]