Class: Tramway::Event::SectionDecorator

Inherits:
Landing::BlockTypes::FeaturesDecorator
  • Object
show all
Defined in:
app/decorators/tramway/event/section_decorator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.collectionsObject



5
6
7
# File 'app/decorators/tramway/event/section_decorator.rb', line 5

def collections
  [:all]
end

.show_associationsObject



9
10
11
# File 'app/decorators/tramway/event/section_decorator.rb', line 9

def show_associations
  [ :partakings ]
end

Instance Method Details

#anchorObject



30
31
32
# File 'app/decorators/tramway/event/section_decorator.rb', line 30

def anchor
  "section-#{object.id}"
end

#backgroundObject



26
27
28
# File 'app/decorators/tramway/event/section_decorator.rb', line 26

def background
  object.photo
end

#event_durationObject



38
39
40
# File 'app/decorators/tramway/event/section_decorator.rb', line 38

def event_duration
  event.duration
end

#event_titleObject



34
35
36
# File 'app/decorators/tramway/event/section_decorator.rb', line 34

def event_title
  event.title
end

#nameObject



18
19
20
# File 'app/decorators/tramway/event/section_decorator.rb', line 18

def name
  "#{object.title} | #{object.event.title}"
end

#titleObject



22
23
24
# File 'app/decorators/tramway/event/section_decorator.rb', line 22

def title
  "#{fa_icon(object.icon)} #{object.title}".html_safe
end