Sha256: 4b7e7a3b49892402c7c8331843c6bba81b9c53c48b494d051c41aecf08c0ff99
Contents?: true
Size: 1.05 KB
Versions: 7
Compression:
Stored size: 1.05 KB
Contents
module Cmor module Testimonials class ApplicationViewHelper < Rao::ViewHelper::Base def render_category(category_or_identifier, options = {}) default_variant_options = Cmor::Testimonials::Configuration.image_variant_options[:category] options.reverse_merge!( autostart: true, interval: 5.0, keyboard: true, pause: :hover, ride: false, wrap: true, controls: true, indicators: false, variant_options: default_variant_options, font_awesome: false, show_image: true ) category = if category_or_identifier.is_a?(Cmor::Testimonials::Category) category_or_identifier else Cmor::Testimonials::Category.where(identifier: category_or_identifier).first end if category.present? && category.testimonials.published.any? render category: category, options: options end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems