Module: EffectiveCarouselsHelper

Defined in:
app/helpers/effective_carousels_helper.rb

Instance Method Summary collapse

Instance Method Details



4
5
6
7
8
9
10
11
12
# File 'app/helpers/effective_carousels_helper.rb', line 4

def render_carousel(name, carousel_options = {})
  carousel = Array(EffectivePages.carousels).find { |carousel| carousel.to_s == name.to_s }

  if carousel.blank?
    raise("unable to find carousel #{name}. Please add it to config/initializers/effective_pages.rb")
  end

  render('effective/carousels/carousel', carousel: carousel, carousel_options: carousel_options)
end