Sha256: 2af526ca1b7495a3af584b3e245033200f9f1f62c36d7ff4aac1bb7cb5ffee5c

Contents?: true

Size: 358 Bytes

Versions: 85

Compression:

Stored size: 358 Bytes

Contents

# frozen_string_literal: true

module Decidim
  #
  # Decorator for initiatives
  #
  class InitiativePresenter < SimpleDelegator
    def author
      @author ||= if user_group
                    Decidim::UserGroupPresenter.new(user_group)
                  else
                    Decidim::UserPresenter.new(super)
                  end
    end
  end
end

Version data entries

85 entries across 85 versions & 1 rubygems

Version Path
decidim-initiatives-0.13.0 app/presenters/decidim/initiative_presenter.rb
decidim-initiatives-0.12.1 app/presenters/decidim/initiative_presenter.rb
decidim-initiatives-0.13.0.pre1 app/presenters/decidim/initiative_presenter.rb
decidim-initiatives-0.12.0 app/presenters/decidim/initiative_presenter.rb
decidim-initiatives-0.12.0.pre app/presenters/decidim/initiative_presenter.rb