Class: Decidim::VersionAuthorCell

Inherits:
AuthorCell
  • Object
show all
Defined in:
app/cells/decidim/version_author_cell.rb

Constant Summary

Constants inherited from AuthorCell

AuthorCell::LAYOUTS

Instance Method Summary collapse

Methods inherited from AuthorCell

#author_name, #context_actions_options, #flag_user, #raw_model

Methods included from FollowableHelper

#follow_button_for

Methods included from Messaging::ConversationHelper

#conversation_between, #conversation_between_multiple, #conversation_label_for, #conversation_name_for, #current_or_new_conversation_path_with, #current_or_new_conversation_path_with_multiple, #current_or_new_profile_conversation_path, #current_or_new_user_conversation_path, #link_to_current_or_new_conversation_with, #text_link_to_current_or_new_conversation_with, #username_list

Methods included from CellsHelper

#current_component, #flaggable?, #from_context, #index_action?, #show_action?, #user_flaggable?, #withdrawable?

Instance Method Details

#authorObject



12
13
14
# File 'app/cells/decidim/version_author_cell.rb', line 12

def author
  @author ||= Decidim.traceability.version_editor(from_context)
end

#display_nameObject



5
6
7
8
9
10
# File 'app/cells/decidim/version_author_cell.rb', line 5

def display_name
  return super unless from_context.is_a?(PaperTrail::Version)
  return author if author.is_a?(String) && author.present?

  super
end