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.
This commit is contained in:
Javi Martín
2024-05-23 19:18:36 +02:00
parent 709f39c6ce
commit e7d2cfbf23

View File

@@ -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