Module: RailsGallery::ViewHelper::Galleria

Defined in:
lib/rails-gallery/view_helper/galleria.rb

Instance Method Summary collapse

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, options = {}
   :a, href: photo.path do
    options.merge! :"data-title" => photo.title, :"data-description" => photo.description
    image_tag photo.path, options
  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, options = {}
   :a, href: photo.path do
    options.merge! :"data-title" => photo.title, :"data-description" => photo.description
    options.merge! :srcset => photo.srcset if photo.srcset?
    image_tag photo.path, options
  end
end