Class: Decidim::Posts::MeetingCell

Inherits:
ViewModel
  • Object
show all
Includes:
Cell::ViewModel::Partial, Meetings::MeetingCellsHelper, PostCellsHelper
Defined in:
app/cells/decidim/posts/meeting_cell.rb

Instance Method Summary collapse

Methods included from PostCellsHelper

#component_settings, #current_component, #current_settings, #participatory_space

Methods included from ApplicationHelper

#category_label, #category_label_singular, #posts_component_for_meeting

Instance Method Details

#comments_enabledObject



42
43
44
# File 'app/cells/decidim/posts/meeting_cell.rb', line 42

def comments_enabled
  model.comments_enabled?
end

#meetingObject



14
15
16
# File 'app/cells/decidim/posts/meeting_cell.rb', line 14

def meeting
  model
end

#meeting_addressObject



34
35
36
# File 'app/cells/decidim/posts/meeting_cell.rb', line 34

def meeting_address
  model.address
end

#meeting_authorObject



18
19
20
# File 'app/cells/decidim/posts/meeting_cell.rb', line 18

def meeting_author
  model.decidim_author_id
end

#meeting_descriptionObject



26
27
28
# File 'app/cells/decidim/posts/meeting_cell.rb', line 26

def meeting_description
  simple_format(meeting_presenter.description(links: true))
end

#meeting_locationObject



38
39
40
# File 'app/cells/decidim/posts/meeting_cell.rb', line 38

def meeting_location
  translated_attribute model.location
end

#meeting_presenterObject



30
31
32
# File 'app/cells/decidim/posts/meeting_cell.rb', line 30

def meeting_presenter
  @meeting_presenter ||= present(model)
end

#meeting_titleObject



22
23
24
# File 'app/cells/decidim/posts/meeting_cell.rb', line 22

def meeting_title
  translated_attribute model.title
end

#showObject



10
11
12
# File 'app/cells/decidim/posts/meeting_cell.rb', line 10

def show
  render :show
end