This commit is contained in:
@@ -13,6 +13,8 @@ class WikiPage < ApplicationRecord
|
||||
foreign_key: :redirect_page_id,
|
||||
dependent: :nullify
|
||||
|
||||
has_many :wiki_versions
|
||||
|
||||
belongs_to :tag_name
|
||||
validates :tag_name, presence: true
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
class WikiVersion < ApplicationRecord
|
||||
include VersionRecord
|
||||
|
||||
belongs_to :wiki_page
|
||||
|
||||
validates :title, presence: true
|
||||
validates :body, presence: true
|
||||
end
|
||||
Reference in New Issue
Block a user