Sha256: d299c688db0cbf85cb99aac61f4d4ef0e4f40035a9f48e9405c76ceeac25a564

Contents?: true

Size: 504 Bytes

Versions: 1

Compression:

Stored size: 504 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
        sanitize(translated_attribute(content.title))
      end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
decidim-plans-0.16.5 app/presenters/decidim/plans/content_presenter.rb