Sha256: e2d9438e5952b7284e6a4e0630b5a25c7ff55096cff90843b222fab0680d469d
Contents?: true
Size: 438 Bytes
Versions: 13
Compression:
Stored size: 438 Bytes
Contents
# frozen_string_literal: true module ContentProviders # Selects a random slide from a slideshow to display. class RandomSlideProvider < BitCore::ContentProvider def render_current(options) slides = source_content.slides options.view_context.render( template: "think_feel_do_engine/slides/homepage", locals: { slide: slides.offset(rand(slides.count)).first } ) end end end
Version data entries
13 entries across 13 versions & 1 rubygems