debian-mirror-gitlab/app/models/wiki_page/meta.rb

22 lines
448 B
Ruby
Raw Normal View History

2020-04-22 19:07:51 +05:30
# frozen_string_literal: true
class WikiPage
class Meta < ApplicationRecord
2021-02-22 17:27:13 +05:30
include HasWikiPageMetaAttributes
2020-04-22 19:07:51 +05:30
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
2021-02-22 17:27:13 +05:30
def self.container_key
:project_id
2020-04-22 19:07:51 +05:30
end
end
end