Class: Decidim::VersionAuthorCell

Inherits:
ViewModel
  • Object
show all
Includes:
ApplicationHelper, SanitizeHelper
Defined in:
decidim-core/app/cells/decidim/version_author_cell.rb

Instance Method Summary collapse

Instance Method Details

#authorObject



8
9
10
# File 'decidim-core/app/cells/decidim/version_author_cell.rb', line 8

def author
  model
end

#author_nameObject



12
13
14
15
16
17
18
# File 'decidim-core/app/cells/decidim/version_author_cell.rb', line 12

def author_name
  return nil unless author
  return author if author.is_a?(String)
  return t("decidim.version_author.show.deleted") if author.deleted?

  author.name
end