app/helpers/integral/application_helper.rb in integral-1.5.1 vs app/helpers/integral/application_helper.rb in integral-2.0.0

- old
+ new

@@ -11,14 +11,17 @@ content_tag 'script', type: 'application/ld+json' do yield.to_json.html_safe end end - # @param [String] content HTML, most likely generated from the WYSIWYG editor - # - # @return [String] Processed HTML. Any Integral Widgets placeholders replaced with content. - def render_content(content) - Integral::ContentRenderer.render(content) + def render_block_list(block_list) + Rails.cache.fetch block_list do + ::BlockEditor::BlockListRenderer.render(block_list.content) + end + end + + def render_blocks(content) + ::BlockEditor::BlockListRenderer.render(content) end # @param [Integral::List] list the list to render # @param [Hash] opts the options to render list # @option opts [String] :html_classes the html classes for the list