Sha256: 7502832b977d045f3c397941a9690333c30996ab1bec27a80d82cb26ac8ae567

Contents?: true

Size: 630 Bytes

Versions: 3

Compression:

Stored size: 630 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Debates
    #
    # A dummy presenter to abstract out the author of an official debate.
    #
    class OfficialAuthorPresenter
      def name
        I18n.t("decidim.debates.models.debate.fields.official_debate")
      end

      def nickname
        ""
      end

      def badge
        ""
      end

      def profile_path
        ""
      end

      def avatar_url
        ActionController::Base.helpers.asset_path("decidim/default-avatar.svg")
      end

      def deleted?
        false
      end

      def can_be_contacted?
        false
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
decidim-debates-0.15.2 app/presenters/decidim/debates/official_author_presenter.rb
decidim-debates-0.15.1 app/presenters/decidim/debates/official_author_presenter.rb
decidim-debates-0.15.0 app/presenters/decidim/debates/official_author_presenter.rb