#2 完了
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user