https://github.com/venables/nprogress-rails
Adds the nprogress slim progress bars libary to Rails
https://github.com/venables/nprogress-rails
Last synced: over 1 year ago
JSON representation
Adds the nprogress slim progress bars libary to Rails
- Host: GitHub
- URL: https://github.com/venables/nprogress-rails
- Owner: venables
- License: mit
- Created: 2013-08-21T12:51:28.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-08-21T12:52:01.000Z (almost 13 years ago)
- Last Synced: 2025-02-10T03:28:32.350Z (over 1 year ago)
- Language: Ruby
- Size: 105 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# nprogress-rails
Adds the awesome [nprogress](https://github.com/rstacruz/nprogress) library by [Rico Sta. Cruz](http://ricostacruz.com/) to your Rails app.
## Installation
Add this line to your application's `Gemfile`:
gem 'nprogress-rails'
And then execute:
$ bundle
Add the following to your `app/assets/javascripts/application.js` file:
//= require nprogress
Add the following to your `app/assets/stylesheets/application.css` file:
*= require nprogress
## Usage
See the [nprogress README](https://github.com/rstacruz/nprogress) for complete usage instructions
**Basic usage:**
```javascript
NProgress.start();
NProgress.done();
```
**For turbolinks:**
```javascript
$(document).on('page:fetch', function() { NProgress.start(); });
$(document).on('page:change', function() { NProgress.done(); });
$(document).on('page:restore', function() { NProgress.remove(); });
```
## Version mapping
This gem is a packaged version of nprogress and the versions should map exactly to the nprogress versions. For example, version `0.1.1` of this gem uses `0.1.1` of the nprogress library.
# Credits
100% of the credit goes to [Rico Sta. Cruz](http://ricostacruz.com/) for making the nprogress library.
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request