Class: Decidim::EnhancedTextwork::CollaborativeDraftPresenter
- Inherits:
-
ParagraphPresenter
- Object
- ResourcePresenter
- ParagraphPresenter
- Decidim::EnhancedTextwork::CollaborativeDraftPresenter
- Defined in:
- app/presenters/decidim/enhanced_textwork/collaborative_draft_presenter.rb
Overview
Decorator for collaborative drafts
Instance Method Summary collapse
Methods inherited from ParagraphPresenter
#body, #display_mention, #id_and_title, #paragraph, #paragraph_path, #resource_manifest, #title, #title_if_enabled, #versions
Instance Method Details
#author ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'app/presenters/decidim/enhanced_textwork/collaborative_draft_presenter.rb', line 9 def = __getobj__..first @author ||= if .user_group Decidim::UserGroupPresenter.new(.user_group) else Decidim::UserPresenter.new(.) end end |
#collaborative_draft_path ⇒ Object
20 21 22 |
# File 'app/presenters/decidim/enhanced_textwork/collaborative_draft_presenter.rb', line 20 def collaborative_draft_path Decidim::ResourceLocatorPresenter.new(collaborative_draft).path end |