Module: BootstrapLeather::CarouselsHelper
- Included in:
- ApplicationHelper
- Defined in:
- app/helpers/bootstrap_leather/carousels_helper.rb
Overview
Carousels, i.e. slideshows
Instance Method Summary collapse
- #carousel(id, items, html_options = {}, &block) ⇒ Object
- #carousel_with_thumbnails(id, items, html_options = {}, &block) ⇒ Object
Instance Method Details
#carousel(id, items, html_options = {}, &block) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/helpers/bootstrap_leather/carousels_helper.rb', line 6 def carousel(id, items, = {}, &block) [:id] = id [:data] ||= {} [:data][:ride] = 'carousel' render( partial: 'bootstrap_leather/carousels/carousel', locals: { id: id, html_options: , slides: items.collect { |item| capture(item, &block) } } ) end |
#carousel_with_thumbnails(id, items, html_options = {}, &block) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'app/helpers/bootstrap_leather/carousels_helper.rb', line 19 def carousel_with_thumbnails(id, items, = {}, &block) [:id] = id [:data] ||= {} [:data][:ride] = 'carousel' render( partial: 'bootstrap_leather/carousels/carousel_with_thumbnails', locals: { id: id, html_options: , slides: items.collect { |item| capture(item, &block) } } ) end |