Sha256: 901212a435a6f9bc3bbb09e800133aa7bc4424c8cb8e37e3748d747e8d31a8ad

Contents?: true

Size: 489 Bytes

Versions: 25

Compression:

Stored size: 489 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Blogs
    #
    # Decorator for posts
    #
    class PostPresenter < SimpleDelegator
      def author
        @author ||= if official?
                      Decidim::Blogs::OfficialAuthorPresenter.new
                    elsif user_group?
                      Decidim::UserGroupPresenter.new(super)
                    else
                      Decidim::UserPresenter.new(super)
                    end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
decidim-blogs-0.29.1 app/presenters/decidim/blogs/post_presenter.rb
decidim-blogs-0.28.4 app/presenters/decidim/blogs/post_presenter.rb
decidim-blogs-0.27.9 app/presenters/decidim/blogs/post_presenter.rb
decidim-blogs-0.29.0 app/presenters/decidim/blogs/post_presenter.rb
decidim-blogs-0.28.3 app/presenters/decidim/blogs/post_presenter.rb
decidim-blogs-0.27.8 app/presenters/decidim/blogs/post_presenter.rb
decidim-blogs-0.29.0.rc4 app/presenters/decidim/blogs/post_presenter.rb
decidim-blogs-0.29.0.rc3 app/presenters/decidim/blogs/post_presenter.rb
decidim-blogs-0.29.0.rc2 app/presenters/decidim/blogs/post_presenter.rb
decidim-blogs-0.29.0.rc1 app/presenters/decidim/blogs/post_presenter.rb
decidim-blogs-0.28.2 app/presenters/decidim/blogs/post_presenter.rb
decidim-blogs-0.27.7 app/presenters/decidim/blogs/post_presenter.rb
decidim-blogs-0.28.1 app/presenters/decidim/blogs/post_presenter.rb
decidim-blogs-0.27.6 app/presenters/decidim/blogs/post_presenter.rb
decidim-blogs-0.28.0 app/presenters/decidim/blogs/post_presenter.rb
decidim-blogs-0.27.5 app/presenters/decidim/blogs/post_presenter.rb
decidim-blogs-0.28.0.rc5 app/presenters/decidim/blogs/post_presenter.rb
decidim-blogs-0.28.0.rc4 app/presenters/decidim/blogs/post_presenter.rb
decidim-blogs-0.27.4 app/presenters/decidim/blogs/post_presenter.rb
decidim-blogs-0.27.3 app/presenters/decidim/blogs/post_presenter.rb