Class: Decidim::Proposals::ProposalPresenter

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
app/presenters/decidim/proposals/proposal_presenter.rb

Overview

Decorator for proposals

Instance Method Summary collapse

Instance Method Details

#authorObject



9
10
11
12
13
14
15
16
17
# File 'app/presenters/decidim/proposals/proposal_presenter.rb', line 9

def author
  @author ||= if official?
                Decidim::Proposals::OfficialAuthorPresenter.new
              elsif user_group
                Decidim::UserGroupPresenter.new(user_group)
              else
                Decidim::UserPresenter.new(super)
              end
end