module RailsGallery::ViewHelper
Public Class Methods
galleries()
click to toggle source
# File lib/rails-gallery/view_helper.rb, line 8 def self.galleries %w{galleria responsive slideshow touch_touch} end
version()
click to toggle source
# File lib/rails-gallery/view_helper.rb, line 12 def self.version '0.2.2' end
Public Instance Methods
gallery_image(type, photo, options = {})
click to toggle source
# File lib/rails-gallery/view_helper.rb, line 21 def gallery_image type, photo, options = {} meth_name = "#{type}_gallery_image" validate_gallery_photo! photo unless respond_to? meth_name raise ArgumentError, "Gallery #{type} is not yet supported. Please add a View helper module for this gallery using the convention followed by the other galleries..." end send(meth_name, photo, options) end
gallery_imageset(type, imageset, options = {})
click to toggle source
# File lib/rails-gallery/view_helper.rb, line 30 def gallery_imageset type, imageset, options = {} meth_name = "#{type}_gallery_imageset" # validate_gallery_imageset! imageset unless respond_to? meth_name raise ArgumentError, "Gallery #{type} is not yet supported for imageset. Please add a View helper module for this gallery using the convention followed by the other galleries..." end send(meth_name, imageset, options) end