chore: Improve Helpcenter custom domains (#5456)

- Support rendering articles over frontend URL
- Support rendering articles over help center URL
- Support rendering help center home page in the custom domain root
This commit is contained in:
Sojan Jose
2022-09-20 06:06:01 +05:30
committed by GitHub
parent a773ad7d08
commit 99de8f4500
10 changed files with 35 additions and 23 deletions

View File

@@ -18,7 +18,8 @@
#
# Indexes
#
# index_portals_on_slug (slug) UNIQUE
# index_portals_on_custom_domain (custom_domain) UNIQUE
# index_portals_on_slug (slug) UNIQUE
#
class Portal < ApplicationRecord
include Rails.application.routes.url_helpers
@@ -40,6 +41,7 @@ class Portal < ApplicationRecord
validates :account_id, presence: true
validates :name, presence: true
validates :slug, presence: true, uniqueness: true
validates :custom_domain, uniqueness: true, allow_nil: true
validate :config_json_format
accepts_nested_attributes_for :members