Lightbox2 for Rails asset pipeline
- 
Modified for Turbolinks and Sprockets' asset digests compatibility 
- 
Lightbox2 version: 2.8.2 
- Add to your Gemfileand install with bundler:
gem 'lightbox2-rails'bundle install- Add to your config/initializers/assets.rbin order to have the images for lightbox precompiled:
Rails.application.config.assets.precompile += %w( lightbox/* )- Require the modified Lightbox2 javascript file in app/assets/javascripts/application.js:
//= require lightboxOr in app/assets/javascripts/application.js.coffee:
#= require lightbox- Require the modified Lightbox2 css file in app/assets/stylesheets/application.css:
*= require lightboxOr in app/assets/javascripts/application.css.scss / app/assets/javascripts/application.css.sass:
@import 'lightbox';@import lightbox- Changing default options (Optional)
Please refer to Lightbox2 project page.
Lightbox2 created by Lokesh Dhakar, licensed under the Creative Commons Attribution 2.5 License
Copyright Gavin Lam, released under the MIT License.