Skip to content

Commit 2f22624

Browse files
committed
Extract the redudant setup steps and remove instructions for older versions of rails/jquery-rails.
1 parent 97c28b1 commit 2f22624

File tree

1 file changed

+6
-20
lines changed

1 file changed

+6
-20
lines changed

README.md

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,33 +31,19 @@ gem 'jquery-rails'
3131

3232
And run:
3333

34-
$ bundle install
35-
36-
This next step depends on your version of Rails.
37-
38-
a. For Rails 3.1, add these lines to the top of your app/assets/javascripts/application.js file:
39-
40-
```javascript
41-
//= require jquery
42-
//= require jquery_ujs
34+
```shell
35+
$ bundle install
4336
```
4437

45-
b. For Rails 3.0, run this command:
46-
47-
*Be sure to get rid of the rails.js file if it exists, and instead use
48-
the new jquery_ujs.js file that gets copied to the public directory.
49-
Choose to overwrite jquery_ujs.js if prompted.*
50-
51-
$ rails generate jquery:install
52-
53-
c. For Rails 2.x and for manual installation follow [this wiki](https://github.com/rails/jquery-ujs/wiki/Manual-installing-and-Rails-2) .
54-
5538
Installation using Bower
5639
------------
5740

5841
Run `bower install jquery-ujs --save` to install the jquery-ujs package.
5942

60-
For Rails 3.1 and above, add these lines to the top of your app/assets/javascripts/application.js file:
43+
Usage
44+
------------
45+
46+
Require both `jquery` and `jquery-ujs` into your application.js manifest.
6147

6248
```javascript
6349
//= require jquery

0 commit comments

Comments
 (0)