feat: Add support for plain design help center layout (#7598)

This commit is contained in:
Pranav Raj S
2023-07-24 16:43:52 -07:00
committed by GitHub
parent d837065545
commit fa7bbdb0b3
9 changed files with 80 additions and 43 deletions

View File

@@ -1,8 +1,13 @@
class Public::Api::V1::Portals::BaseController < PublicController
before_action :show_plain_layout
around_action :set_locale
private
def show_plain_layout
@is_plain_layout_enabled = params[:show_plain_layout] == 'true'
end
def set_locale(&)
switch_locale_with_portal(&) if params[:locale].present?
switch_locale_with_article(&) if params[:article_slug].present?