chore: allow article to create without content (#14007)

This commit is contained in:
Sivin Varghese
2026-04-14 16:36:11 +05:30
committed by aakashb95
parent a393bf5906
commit 5247be59ba
5 changed files with 15 additions and 6 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ class Article < ApplicationRecord
validates :account_id, presence: true
validates :author_id, presence: true
validates :title, presence: true
validates :content, presence: true
validates :content, presence: true, if: :published?
# ensuring that the position is always set correctly
before_create :add_position_to_article