Module: RailsGallery::ViewHelper::Galleria
- Defined in:
- lib/rails-gallery/view_helper/galleria.rb
Instance Method Summary collapse
- #riagal_image(photo, options = {}) ⇒ Object (also: #galleria_gallery_image)
- #riagal_imageset(photo, options = {}) ⇒ Object (also: #galleria_gallery_imageset)
Instance Method Details
#riagal_image(photo, options = {}) ⇒ Object Also known as: galleria_gallery_image
4 5 6 7 8 9 |
# File 'lib/rails-gallery/view_helper/galleria.rb', line 4 def riagal_image photo, = {} content_tag :a, href: photo.path do .merge! :"data-title" => photo.title, :"data-description" => photo.description image_tag photo.path, end end |
#riagal_imageset(photo, options = {}) ⇒ Object Also known as: galleria_gallery_imageset
11 12 13 14 15 16 17 |
# File 'lib/rails-gallery/view_helper/galleria.rb', line 11 def riagal_imageset photo, = {} content_tag :a, href: photo.path do .merge! :"data-title" => photo.title, :"data-description" => photo.description .merge! :srcset => photo.srcset if photo.srcset? image_tag photo.path, end end |