Sha256: bdcabf1224d8e2e7f7a1c62be04184a5d79be69fd367f6b5a4424f3d7a629383

Contents?: true

Size: 447 Bytes

Versions: 8

Compression:

Stored size: 447 Bytes

Contents

# frozen_string_literal: true

module Decidim
  class StaticPageTopic < ApplicationRecord
    validates :title, presence: true
    include Decidim::TranslatableResource

    translatable_fields :title, :description

    default_scope { order(arel_table[:weight].asc) }

    belongs_to :organization, class_name: "Decidim::Organization"
    has_many :pages, class_name: "Decidim::StaticPage", foreign_key: "topic_id", dependent: :nullify
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
decidim-core-0.23.6 app/models/decidim/static_page_topic.rb
decidim-core-0.23.5 app/models/decidim/static_page_topic.rb
decidim-core-0.23.4 app/models/decidim/static_page_topic.rb
decidim-core-0.23.3 app/models/decidim/static_page_topic.rb
decidim-core-0.23.2 app/models/decidim/static_page_topic.rb
decidim-core-0.23.1 app/models/decidim/static_page_topic.rb
decidim-core-0.23.1.rc1 app/models/decidim/static_page_topic.rb
decidim-core-0.23.0 app/models/decidim/static_page_topic.rb