bootstrap-switch-rails provides the bootstrap-switch plugin as a Rails engine to use it within the asset pipeline.
Add this to your Gemfile:
gem "bootstrap-switch-rails"
and run bundle install
.
In your application.js
, include the following:
//= require bootstrap-switch
In your application.css
, include the following:
/*
* for bootstrap3
*= require bootstrap3-switch
*
* or for bootstrap2
*= require bootstrap2-switch
*/
*= require bootstrap-switch
or in any SASS
file, include the following:
/* for bootstrap3 */
@import "bootstrap3-switch";
/* or for bootstrap2 */
@import "bootstrap2-switch";
See the demo page for examples how to use the plugin
- The bootstrap-switch plugin is licensed under the MIT License
- The bootstrap-switch-rails project is licensed under the MIT License
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request