Sha256: 7dd238b5d711ac39a4560cbc8375301c147ae5511fdb50ef70cdf76585901a5d
Contents?: true
Size: 680 Bytes
Versions: 60
Compression:
Stored size: 680 Bytes
Contents
# frozen_string_literal: true module Decidim module Proposals # # Decorator for collaborative drafts # class CollaborativeDraftPresenter < ProposalPresenter def author coauthorship = __getobj__.coauthorships.first @author ||= if coauthorship.user_group Decidim::UserGroupPresenter.new(coauthorship.user_group) else Decidim::UserPresenter.new(coauthorship.author) end end alias collaborative_draft proposal def collaborative_draft_path Decidim::ResourceLocatorPresenter.new(collaborative_draft).path end end end end
Version data entries
60 entries across 60 versions & 1 rubygems