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.
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user