From 6bb22125f2a5c7b0f64339757f07f96f95c7b776 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Fri, 22 Jan 2021 10:49:03 +0100 Subject: [PATCH] Use the optimized page in page layouts controller By using this optimized page model in the page layouts helps to reduce the db queries for that controller as well. --- app/controllers/alchemy/json_api/layout_pages_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/alchemy/json_api/layout_pages_controller.rb b/app/controllers/alchemy/json_api/layout_pages_controller.rb index 3e056c3..e70350b 100644 --- a/app/controllers/alchemy/json_api/layout_pages_controller.rb +++ b/app/controllers/alchemy/json_api/layout_pages_controller.rb @@ -5,7 +5,7 @@ class LayoutPagesController < JsonApi::PagesController private def base_page_scope - Page.all + ::Alchemy::JsonApi::Page.all end def page_scope