Demo Rails 3.1 App with jQuery UJS (AJAX) and Remotipart
This is a very simple demo Rails 3.1 with all CRUD (create, read, update, delete) functionality in AJAX using the jquery-rails gem which bundles jquery-ujs, in combination with the Remotipart gem for AJAX file-uploads.
For relevant code, see the Comments controller and views. Also see unobtrusive bindings in app/assets/javascripts/comments.js.
Documentation & Resources
Documentation and resources for the Rails jquery-ujs may be found in the following articles:
- Remotipart Rails Gem
- Rails 3 Remote Links and Forms: A Definitive Guide
- Rails 3 Remote Links and Forms Part 2: Data-type with jQuery
- http://www.alfajango.com/blog/rails-jquery-ujs-now-interactive/
- New ajax:aborted Rails jQuery UJS Hooks
- Wiki
Also, see the remotipart branch for AJAX file-upload functionality.