Class: BitCore::ContentProviders::SlideshowProvider
- Inherits:
-
BitCore::ContentProvider
- Object
- ActiveRecord::Base
- BitCore::ContentProvider
- BitCore::ContentProviders::SlideshowProvider
- Defined in:
- app/models/bit_core/content_providers/slideshow_provider.rb
Overview
Defines presentation logic for a Slideshow.
Instance Method Summary collapse
- #exists?(position) ⇒ Boolean
- #render_current(options) ⇒ Object
- #show_nav_link? ⇒ Boolean
- #slide(position) ⇒ Object
- #slideshow ⇒ Object
Methods inherited from BitCore::ContentProvider
Instance Method Details
#exists?(position) ⇒ Boolean
23 24 25 |
# File 'app/models/bit_core/content_providers/slideshow_provider.rb', line 23 def exists?(position) ..exists?(position: position) end |
#render_current(options) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'app/models/bit_core/content_providers/slideshow_provider.rb', line 9 def render_current() .view_context.render( template: "slides/show", locals: { slide: (.position) } ) end |
#show_nav_link? ⇒ Boolean
27 28 29 |
# File 'app/models/bit_core/content_providers/slideshow_provider.rb', line 27 def show_nav_link? true end |
#slide(position) ⇒ Object
18 19 20 21 |
# File 'app/models/bit_core/content_providers/slideshow_provider.rb', line 18 def (position) ..where(position: position).first || BitCore::Slide.new(body: "no slides") end |
#slideshow ⇒ Object
5 6 7 |
# File 'app/models/bit_core/content_providers/slideshow_provider.rb', line 5 def source_content end |