Skip to content

Instantly share code, notes, and snippets.

@gambala
Created June 6, 2020 15:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gambala/977c110d58a2c01ba015988c5942d196 to your computer and use it in GitHub Desktop.
Save gambala/977c110d58a2c01ba015988c5942d196 to your computer and use it in GitHub Desktop.
blueimp-gallery inside rails
/* app/assets/stylesheets/web/application.css */
..
*= require blueimp-gallery-all
..
/ app/views/layouts/application.html.slim
doctype html
html
head
...
body
...
= render 'gallery_blueimp'
// app/assets/javascripts/application.js
...
//= require blueimp-gallery-all
...
gem 'blueimp-gallery'
/ Anywhere in views
= link_to image_path('image-full.jpg'), target: '_blank', data: { gallery: 'gallery-name' }
= image_tag 'image-thumb.jpg'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment