Merge branch 'develop' into feat/read-only-token

This commit is contained in:
Shivam Mishra
2026-06-03 12:05:54 +05:30
committed by GitHub
560 changed files with 9067 additions and 1506 deletions
+1
View File
@@ -109,6 +109,7 @@ class Account < ApplicationRecord
before_validation :validate_limit_keys
after_create_commit :notify_creation
after_update_commit :clear_unread_conversation_counts_cache, if: :saved_change_to_feature_conversation_unread_counts?
after_destroy :remove_account_sequences
def agents
+4
View File
@@ -55,10 +55,14 @@ class Article < ApplicationRecord
before_validation :ensure_article_slug
before_validation :ensure_locale_in_article
# Slugs that collide with help center routes (e.g. /hc/:slug/:locale/search)
RESERVED_SLUGS = %w[search articles categories].freeze
validates :account_id, presence: true
validates :author_id, presence: true
validates :title, presence: true
validates :content, presence: true, if: :published?
validates :slug, exclusion: { in: RESERVED_SLUGS }
# ensuring that the position is always set correctly
before_create :add_position_to_article