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

16 lines
314 B
Ruby
Raw Normal View History

2020-04-22 19:07:51 +05:30
# frozen_string_literal: true
class WikiPage
class Slug < ApplicationRecord
2021-02-22 17:27:13 +05:30
def self.meta_foreign_key
:wiki_page_meta_id
end
2020-04-22 19:07:51 +05:30
2021-02-22 17:27:13 +05:30
include HasWikiPageSlugAttributes
2020-04-22 19:07:51 +05:30
2021-02-22 17:27:13 +05:30
self.table_name = 'wiki_page_slugs'
2020-04-22 19:07:51 +05:30
2021-02-22 17:27:13 +05:30
belongs_to :wiki_page_meta, class_name: 'WikiPage::Meta', inverse_of: :slugs
2020-04-22 19:07:51 +05:30
end
end