Class: Decidim::CoauthorshipsCell

Inherits:
ViewModel
  • Object
show all
Defined in:
app/cells/decidim/coauthorships_cell.rb

Overview

This cell renders a collapsible list of a model's coauthors.

Example:

cell("decidim/coauthorships", @proposal)

Instance Method Summary collapse

Instance Method Details

#showObject



10
11
12
13
14
15
16
17
18
19
20
# File 'app/cells/decidim/coauthorships_cell.rb', line 10

def show
  if authorable?
    cell "decidim/author", presenter_for_author(model), has_actions: has_actions?, from: model
  else
    cell(
      "decidim/collapsible_authors",
      presenters_for_identities(model),
      options.merge(from: model)
    )
  end
end