We were getting a warning in one of the tests: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated: application/nonExistentJavaScript.js I haven't found a case where the behavior on production environments is different due to this change; the application seems to behave the same way as it used to. So I'm not adding tests for this change.
20 lines
518 B
Ruby
20 lines
518 B
Ruby
class PagesController < ApplicationController
|
|
include FeatureFlags
|
|
skip_authorization_check
|
|
|
|
feature_flag :help_page, if: lambda { params[:id] == "help/index" }
|
|
|
|
def show
|
|
@custom_page = SiteCustomization::Page.published.find_by(slug: params[:id])
|
|
|
|
if @custom_page.present?
|
|
@cards = @custom_page.cards
|
|
render action: :custom_page
|
|
else
|
|
render action: params[:id].split(".").first
|
|
end
|
|
rescue ActionView::MissingTemplate
|
|
head :not_found, content_type: "text/html"
|
|
end
|
|
end
|