Okay, today I would like to show how to add progress bar in Ruby on Rails application. For add progress bar in Ruby on Rails application I use nprogress-rails ruby gem.
Installation
Add nprogress-rails ruby gem to Gemfile:
1
|
|
And then open terminal type:
1
|
|
Usage
Add the requires to the application.js:
1 2 |
|
Also, into the application.css.scss:
1 2 |
|
And then, add NProgress.start(); to application.js for loading progress bar whenever you load each pages:
1 2 3 |
|
So far so good, let enjoy the progress bar in your application. Thank for reading :)