From b2c8fee059146e885d872942abd45088a6c53ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 17 Jul 2023 00:17:59 +0200 Subject: [PATCH] Ignore dots in slugs when rendering custom pages 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. --- app/controllers/pages_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index d33854784..bc997297b 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -11,7 +11,7 @@ class PagesController < ApplicationController @cards = @custom_page.cards render action: :custom_page else - render action: params[:id] + render action: params[:id].split(".").first end rescue ActionView::MissingTemplate head :not_found, content_type: "text/html"