This commit is contained in:
2025-05-15 02:21:42 +09:00
parent 137c86bba7
commit 4cf3fc4d8c
12 changed files with 124 additions and 57 deletions
+11
View File
@@ -0,0 +1,11 @@
class WikiPage < ApplicationRecord
belongs_to :tag, optional: true
belongs_to :created_user, class_name: 'User', foreign_key: 'created_user_id'
belongs_to :updated_user, class_name: 'User', foreign_key: 'updated_user_id'
validates :title, presence: true, length: { maximum: 255 }, uniqueness: true
def gollum_path
"wiki/#{ title.parameterize }.md"
end
end