Move content blocks forms partials to components

This way we can simplify the controller a little bit, and it'll be
easier to write tests for them when we change the code.
This commit is contained in:
Javi Martín
2024-05-23 19:30:26 +02:00
parent 1898bdec56
commit 2a5edbb5dd
6 changed files with 38 additions and 12 deletions

View File

@@ -34,7 +34,6 @@ class Admin::SiteCustomization::ContentBlocksController < Admin::SiteCustomizati
end
def edit
@selected_content_block = @content_block.name
end
def update
@@ -71,7 +70,6 @@ class Admin::SiteCustomization::ContentBlocksController < Admin::SiteCustomizati
def edit_heading_content_block
@content_block = Budget::ContentBlock.find(params[:id])
@selected_content_block = "hcb_#{@content_block.heading_id}"
@is_heading_content_block = true
render :edit
end