Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Creating a 100% ajax CRUD using Rails 3 and UJS
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.idea
app
config
db
doc
lib/tasks
log
public
script
test
vendor
.gitignore
.rvmrc
Gemfile
Gemfile.lock
README.md
Rakefile
config.ru

README.md

Ajax on Rails

Creating a 100% ajax CRUD using Rails 3.1 and UJS, inspired by stJhimy.

Steps in augmenting the default (nifty) scaffold:

  1. Create a unique form in /posts that will do everything with ajax: index, create, edit and destroy. Removed new and show.
  2. Add ajax magic:
    • remote requests, both in controller and links
    • placeholder divs to be handled with UJS
    • remove the redirects from the controller
    • the actions return JS, to change the DOM

PoC covering:

  • Rails 3.1
  • UJS with jQuery
  • nifty-generators
Something went wrong with that request. Please try again.