Sha256: 554f6eef4a695af4b2f695145f042fb08c65151b4616fc4c1352b68465c06ec2

Contents?: true

Size: 509 Bytes

Versions: 8

Compression:

Stored size: 509 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Plans
    #
    # Decorator for contents
    #
    class ContentPresenter < SimpleDelegator
      include Rails.application.routes.mounted_helpers
      include TranslatableAttributes
      include Plans::RichPresenter

      def content
        __getobj__
      end

      def title
        plain_content(translated_attribute(content.title))
      end

      def body
        rich_content(translated_attribute(content.body))
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
decidim-plans-0.18.2 app/presenters/decidim/plans/content_presenter.rb
decidim-plans-0.18.1 app/presenters/decidim/plans/content_presenter.rb
decidim-plans-0.18.0 app/presenters/decidim/plans/content_presenter.rb
decidim-plans-0.17.0 app/presenters/decidim/plans/content_presenter.rb
decidim-plans-0.16.9 app/presenters/decidim/plans/content_presenter.rb
decidim-plans-0.16.8 app/presenters/decidim/plans/content_presenter.rb
decidim-plans-0.16.7 app/presenters/decidim/plans/content_presenter.rb
decidim-plans-0.16.6 app/presenters/decidim/plans/content_presenter.rb