Sha256: 57084a9a73e51035b829cd063b05be5d5bb48751425cfd31e15ebe2189a2c146
Contents?: true
Size: 538 Bytes
Versions: 50
Compression:
Stored size: 538 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 def accessible_pages_for(user) pages.accessible_for(organization, user) end end end
Version data entries
50 entries across 50 versions & 1 rubygems