Welcome to mirror list, hosted at ThFree Co, Russian Federation.

meta.rb « wiki_page « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 70b5547ffad7107c0538ab87b88050214ecf874c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

class WikiPage
  class Meta < ApplicationRecord
    include HasWikiPageMetaAttributes

    self.table_name = 'wiki_page_meta'

    belongs_to :project

    has_many :slugs, class_name: 'WikiPage::Slug', foreign_key: 'wiki_page_meta_id', inverse_of: :wiki_page_meta

    validates :project_id, presence: true

    alias_method :resource_parent, :project

    def self.container_key
      :project_id
    end
  end
end