Sha256: 8856939ea3d4c3513ec357c4747a5e5f5e993dcc6d7065d22623a65785969e98
Contents?: true
Size: 834 Bytes
Versions: 4
Compression:
Stored size: 834 Bytes
Contents
require 'hermitage/rails_render_core' if defined? Rails module Hermitage module ViewHelpers # Renders gallery markup. # # Arguments: # * +objects+ Array of objects that should be rendered. # * +options+ Hash of options. There is list of available options in Defaults module. # # Examples: # # render_gallery_for @images # @images here is array of Image instances # render_gallery_for album.photos # album.photos is array of Photo instances # # it will render the objects contained in array and will use :images (or :photos) as config name. # Config names are formed by the class name of the first element in array. # def render_gallery_for(objects, options = {}) RailsRenderCore.new(objects, options).render if defined? Rails end end end
Version data entries
4 entries across 4 versions & 1 rubygems