No description or website provided.
Pull request Compare This branch is 442 commits behind rails:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
test
.gitignore
Gemfile
Gemfile.lock
MIT-LICENSE.txt
README.rdoc

README.rdoc

jquery-ujs

Unobtrusive jQuery with Rails 3

Automated Installation

Step 1

Add this line to your Gemfile:

gem 'jquery-rails'

Step 2

Run this command:

$ rails generate jquery:install # --ui if you want jQuery UI

Step 3

There is no step three.

Manual installation

jQuery 1.4, 1.4.1, 1.4.2 and 1.4.3 can be used.

Step 1

Download jQuery from docs.jquery.com/Downloading_jQuery and put the file in public/javascripts - for example, the file might be:

public/javascripts/jquery-1.4.3.min.js

Step 2

Copy rails.js from github.com/rails/jquery-ujs/raw/master/src/rails.js into public/javascripts - overwriting the prototype one (you can also delete the other prototype files if you don't need them for anything else.)

Step 3 (optional)

Switch the javascript_include_tag :defaults to use jquery instead of the default prototype helpers.

file config/application.rb

config.action_view.javascript_expansions[:defaults] = %w(jquery rails application)

Testing

Installation

$ gem install bundler
$ bundle install

Running tests

$ bundle exec ruby test/server.rb

Visit localhost:4567 and all the tests should pass. If you want to change any settings then change the settings at the top of test/public/test/settings.js