Class: Decidim::Debates::DebatePresenter

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
app/presenters/decidim/debates/debate_presenter.rb

Overview

Decorator for debates

Instance Method Summary collapse

Instance Method Details

#authorObject



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

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