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

#171

#171

#171

#171

#171

#171

#171

Co-authored-by: miteruzo <miteruzo@naver.com>
Reviewed-on: #345
このコミットはPull リクエスト #345 でマージされました.
このコミットが含まれているのは:
2026-05-10 11:16:49 +09:00
コミット e03cc01109
30個のファイルの変更1333行の追加275行の削除
+2
ファイルの表示
@@ -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
ファイルの表示
@@ -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
ファイルの表示
@@ -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