Class: Decidim::Proposals::CollaborativeDraftPresenter

Inherits:
ProposalPresenter show all
Defined in:
decidim-proposals/app/presenters/decidim/proposals/collaborative_draft_presenter.rb

Overview

Decorator for collaborative drafts

Instance Method Summary collapse

Methods inherited from ProposalPresenter

#body, #display_mention, #editor_body, #id_and_title, #proposal, #proposal_path, #resource_manifest, #title, #versions

Methods included from SanitizeHelper

#decidim_escape_translated, #decidim_html_escape, #decidim_rich_text, #decidim_sanitize, #decidim_sanitize_admin, #decidim_sanitize_editor, #decidim_sanitize_editor_admin, #decidim_sanitize_newsletter, #decidim_sanitize_translated, #decidim_url_escape, included

Methods inherited from ResourcePresenter

#editor_locales, #handle_locales, #title

Methods included from TranslatableAttributes

#attachment?, #default_locale?

Instance Method Details

#authorObject



9
10
11
# File 'decidim-proposals/app/presenters/decidim/proposals/collaborative_draft_presenter.rb', line 9

def author
  @author ||= Decidim::UserPresenter.new(__getobj__.coauthorships.first.author)
end

#collaborative_draft_pathObject



15
16
17
# File 'decidim-proposals/app/presenters/decidim/proposals/collaborative_draft_presenter.rb', line 15

def collaborative_draft_path
  Decidim::ResourceLocatorPresenter.new(collaborative_draft).path
end