Blankman
Blankman

Reputation: 267020

is jquery-ujs all I need to use jquery with rails 3?

Will jquery-ujs give me all the helpers etc. that are used for all ajax helpers etc. that worked with prototype/script.?

Upvotes: 0

Views: 387

Answers (2)

Dan Croak
Dan Croak

Reputation: 1669

Here's a recent overview of Rails' jQuery UJS.

It adds progressive enhancements such as:

  • Adding the ability to make POST, PUT, and DELETE requests from links
  • Popping up confirmation dialogs when submitting forms
  • Disabling links and buttons upon clicks to avoid double-clicks
  • Turning forms into Ajax forms
  • Turning file uploads into Ajax file uploads
  • Adding Cross-Site Request Forgery (CSRF) protection to Ajax requests

Upvotes: 0

Matt
Matt

Reputation: 5398

Yes, all you need jquery-ujs's rails.js to replace original Prototype rails.js (and the jquery itself, to replace Prototype, but I assume you already have that).

Here's a nice screencast about UJS - see the text version as well ("Swapping Framworks" part).

Upvotes: 1

Related Questions