Class: Tramway::Event::SectionDecorator
- Inherits:
-
Landing::BlockTypes::FeaturesDecorator
- Object
- Landing::BlockTypes::FeaturesDecorator
- Tramway::Event::SectionDecorator
- Defined in:
- app/decorators/tramway/event/section_decorator.rb
Class Method Summary collapse
Instance Method Summary collapse
- #anchor ⇒ Object
- #background ⇒ Object
- #event_duration ⇒ Object
- #event_title ⇒ Object
- #name ⇒ Object
- #title ⇒ Object
Class Method Details
.collections ⇒ Object
5 6 7 |
# File 'app/decorators/tramway/event/section_decorator.rb', line 5 def collections [:all] end |
.show_associations ⇒ Object
9 10 11 |
# File 'app/decorators/tramway/event/section_decorator.rb', line 9 def show_associations [ :partakings ] end |
Instance Method Details
#anchor ⇒ Object
30 31 32 |
# File 'app/decorators/tramway/event/section_decorator.rb', line 30 def anchor "section-#{object.id}" end |
#background ⇒ Object
26 27 28 |
# File 'app/decorators/tramway/event/section_decorator.rb', line 26 def background object.photo end |
#event_duration ⇒ Object
38 39 40 |
# File 'app/decorators/tramway/event/section_decorator.rb', line 38 def event_duration event.duration end |
#event_title ⇒ Object
34 35 36 |
# File 'app/decorators/tramway/event/section_decorator.rb', line 34 def event_title event.title end |
#name ⇒ Object
18 19 20 |
# File 'app/decorators/tramway/event/section_decorator.rb', line 18 def name "#{object.title} | #{object.event.title}" end |
#title ⇒ Object
22 23 24 |
# File 'app/decorators/tramway/event/section_decorator.rb', line 22 def title "#{fa_icon(object.icon)} #{object.title}".html_safe end |