When voting investment projects, the sidebar was rendered without the `@heading_content_blocks` being set. That resulted in a 500 error when the heading had content blocks. By extracting the logic to a component, we make sure the heading content blocks are properly set every time this code is rendered, no matter which controller is rendering the view.
6 lines
133 B
Plaintext
6 lines
133 B
Plaintext
<ul class="no-bullet categories">
|
|
<% content_blocks.each do |content_block| %>
|
|
<%= raw content_block.body %>
|
|
<% end %>
|
|
</ul>
|