Sha256: 52846866ba302e05d5b88017109af4b5afc28162a69e7c5be5e464bd1150a551

Contents?: true

Size: 766 Bytes

Versions: 13

Compression:

Stored size: 766 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Pages
    # The data store for a Page in the Decidim::Pages component. It stores a
    # title, description and any other useful information to render a custom page.
    class Page < Pages::ApplicationRecord
      include Decidim::Resourceable
      include Decidim::HasComponent
      include Decidim::Traceable
      include Decidim::Loggable
      include Decidim::TranslatableResource

      translatable_fields :body

      component_manifest_name "pages"

      def self.log_presenter_class_for(_log)
        Decidim::Pages::AdminLog::PagePresenter
      end

      # Public: Pages do not have title so we assign the component one to it.
      def title
        component.name
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-pages-0.29.1 app/models/decidim/pages/page.rb
decidim-pages-0.28.4 app/models/decidim/pages/page.rb
decidim-pages-0.29.0 app/models/decidim/pages/page.rb
decidim-pages-0.28.3 app/models/decidim/pages/page.rb
decidim-pages-0.29.0.rc4 app/models/decidim/pages/page.rb
decidim-pages-0.29.0.rc3 app/models/decidim/pages/page.rb
decidim-pages-0.29.0.rc2 app/models/decidim/pages/page.rb
decidim-pages-0.29.0.rc1 app/models/decidim/pages/page.rb
decidim-pages-0.28.2 app/models/decidim/pages/page.rb
decidim-pages-0.28.1 app/models/decidim/pages/page.rb
decidim-pages-0.28.0 app/models/decidim/pages/page.rb
decidim-pages-0.28.0.rc5 app/models/decidim/pages/page.rb
decidim-pages-0.28.0.rc4 app/models/decidim/pages/page.rb