Sha256: 7b002e54c79f3f828f7adbc75466069b42087069eb15c8ec3bd444444a0f1376

Contents?: true

Size: 359 Bytes

Versions: 13

Compression:

Stored size: 359 Bytes

Contents

# frozen_string_literal: true

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

    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

13 entries across 13 versions & 1 rubygems

Version Path
decidim-core-0.22.0 app/models/decidim/static_page_topic.rb
decidim-core-0.21.0 app/models/decidim/static_page_topic.rb
decidim-core-0.20.1 app/models/decidim/static_page_topic.rb
decidim-core-0.20.0 app/models/decidim/static_page_topic.rb
decidim-core-0.19.1 app/models/decidim/static_page_topic.rb
decidim-core-0.18.1 app/models/decidim/static_page_topic.rb
decidim-core-0.19.0 app/models/decidim/static_page_topic.rb
decidim-core-0.17.2 app/models/decidim/static_page_topic.rb
decidim-core-0.18.0 app/models/decidim/static_page_topic.rb
decidim-core-0.17.1 app/models/decidim/static_page_topic.rb
decidim-core-0.16.1 app/models/decidim/static_page_topic.rb
decidim-core-0.17.0 app/models/decidim/static_page_topic.rb
decidim-core-0.16.0 app/models/decidim/static_page_topic.rb