Skip to content

Commit 658590c

Browse files
committed
Merge pull request #363 from econsultancy/master
Include instructions for installation via Bower
2 parents 7cbd127 + 432191b commit 658590c

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Requirements
2020

2121
If you don't use HTML5, adding "data" attributes to your HTML4 or XHTML pages might make them fail [W3C markup validation][validator]. However, this shouldn't create any issues for web browsers or other user agents.
2222

23-
Installation
23+
Installation using the jQuery-Rails Gem
2424
------------
2525

2626
For automated installation in Rails, use the "jquery-rails" gem. Place this in your Gemfile:
@@ -52,6 +52,29 @@ Choose to overwrite jquery_ujs.js if prompted.*
5252

5353
c. For Rails 2.x and for manual installation follow [this wiki](https://github.com/rails/jquery-ujs/wiki/Manual-installing-and-Rails-2) .
5454

55+
Installation using Bower
56+
------------
57+
58+
Modify your bower.json file and add jQuery-UJS as a dependency as follows:
59+
60+
```javascript
61+
{
62+
"dependencies": {
63+
/* include jQuery-UJS as below */
64+
"jquery-ujs": "[email protected]:rails/jquery-ujs.git"
65+
}
66+
}
67+
```
68+
69+
Then run `bower install jquery-ujs` to install the jQuery-UJS package.
70+
71+
For Rails 3.1 and above, add these lines to the top of your app/assets/javascripts/application.js file:
72+
73+
```javascript
74+
//= require jquery
75+
//= require jquery-ujs/src/rails
76+
```
77+
5578
How to run tests
5679
------------
5780

0 commit comments

Comments
 (0)