feat: Add support to uncategorized articles (#6912)
This commit is contained in:
@@ -41,7 +41,7 @@ class Article < ApplicationRecord
|
||||
inverse_of: :associated_articles,
|
||||
optional: true
|
||||
belongs_to :account
|
||||
belongs_to :category
|
||||
belongs_to :category, optional: true
|
||||
belongs_to :portal
|
||||
belongs_to :author, class_name: 'User'
|
||||
|
||||
@@ -49,7 +49,6 @@ class Article < ApplicationRecord
|
||||
before_validation :ensure_article_slug
|
||||
|
||||
validates :account_id, presence: true
|
||||
validates :category_id, presence: true
|
||||
validates :author_id, presence: true
|
||||
validates :title, presence: true
|
||||
validates :content, presence: true
|
||||
|
||||
Reference in New Issue
Block a user