Add name attribute to heading content blocks
This way we can simplify the code and don't have to rely on `.try` statements which are confusing and so we don't allow them in the `Rails/SafeNavigation` Rubocop rule.
This commit is contained in:
@@ -77,7 +77,7 @@ class Admin::SiteCustomization::ContentBlocksController < Admin::SiteCustomizati
|
||||
if @content_block.is_a? Budget::ContentBlock
|
||||
@selected_content_block = "hcb_#{@content_block.heading_id}"
|
||||
else
|
||||
@selected_content_block = @content_block.heading.name
|
||||
@selected_content_block = @content_block.name
|
||||
end
|
||||
@is_heading_content_block = true
|
||||
render :edit
|
||||
|
||||
Reference in New Issue
Block a user