2020-03-19 08:09:33 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class WikiPage
|
|
|
|
class Meta < ApplicationRecord
|
2020-12-03 10:09:46 -05:00
|
|
|
include HasWikiPageMetaAttributes
|
2020-03-19 08:09:33 -04:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2020-12-03 10:09:46 -05:00
|
|
|
def self.container_key
|
|
|
|
:project_id
|
2020-03-19 08:09:33 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|