投稿排他 (#171) (#345)

#171

#171

#171

#171

#171

#171

#171

Co-authored-by: miteruzo <miteruzo@naver.com>
Reviewed-on: #345
This commit was merged in pull request #345.
This commit is contained in:
2026-05-10 11:16:49 +09:00
parent b47cdc7ad7
commit e03cc01109
30 changed files with 1333 additions and 275 deletions
+2
View File
@@ -28,6 +28,8 @@ class Post < ApplicationRecord
has_one_attached :thumbnail
attribute :version_no, :integer, default: 1
before_validation :normalise_url
validates :url, presence: true, uniqueness: true
+2
View File
@@ -40,6 +40,8 @@ class Tag < ApplicationRecord
belongs_to :tag_name
delegate :wiki_page, to: :tag_name
attribute :version_no, :integer, default: 1
delegate :name, to: :tag_name, allow_nil: true
validates :tag_name, presence: true
+2
View File
@@ -15,6 +15,8 @@ class WikiPage < ApplicationRecord
has_many :wiki_versions
attribute :version_no, :integer, default: 1
belongs_to :tag_name
validates :tag_name, presence: true
validates :body, presence: true