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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user