From e7d2cfbf232dc5d83cbc79736f5abc7e1671c02b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 23 May 2024 19:18:36 +0200 Subject: [PATCH] Add missing action to content blocks controller The code works without this action because both the route and the view are specified, and by default Rails renders the view when there's no action defined. However, the code is easier to understand if the action is present in the controller, which is what we do most of the time. --- .../admin/site_customization/content_blocks_controller.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/admin/site_customization/content_blocks_controller.rb b/app/controllers/admin/site_customization/content_blocks_controller.rb index 7384551f9..9334ee656 100644 --- a/app/controllers/admin/site_customization/content_blocks_controller.rb +++ b/app/controllers/admin/site_customization/content_blocks_controller.rb @@ -11,6 +11,9 @@ class Admin::SiteCustomization::ContentBlocksController < Admin::SiteCustomizati @headings_content_blocks = Budget::ContentBlock.all end + def new + end + def create if is_heading_content_block?(@content_block.name) heading_content_block = new_heading_content_block