From 1ffd3768289057b77e10023c80e89be0294c10e7 Mon Sep 17 00:00:00 2001 From: Rafael Reggiani Manzo Date: Fri, 25 Mar 2016 21:45:50 -0300 Subject: [PATCH] Remove HTML generation from container_block plugin --- app/helpers/boxes_helper.rb | 2 +- plugins/container_block/lib/container_block_plugin/container_block.rb | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/app/helpers/boxes_helper.rb b/app/helpers/boxes_helper.rb index 2c9c767..b568dc7 100644 --- a/app/helpers/boxes_helper.rb +++ b/app/helpers/boxes_helper.rb @@ -88,7 +88,7 @@ module BoxesHelper end def render_block block, prefix = nil, klass = block.class - template_name = klass.name.underscore.sub '_block', '' + template_name = klass.name.demodulize.underscore.sub '_block', '' begin render template: "blocks/#{prefix}#{template_name}", locals: { block: block } rescue ActionView::MissingTemplate diff --git a/plugins/container_block/lib/container_block_plugin/container_block.rb b/plugins/container_block/lib/container_block_plugin/container_block.rb index 5541e16..067a874 100644 --- a/plugins/container_block/lib/container_block_plugin/container_block.rb +++ b/plugins/container_block/lib/container_block_plugin/container_block.rb @@ -66,13 +66,6 @@ class ContainerBlockPlugin::ContainerBlock < Block children_settings[child_id][:width] if children_settings[child_id] end - def content(args={}) - block = self - proc do - render :file => 'blocks/container', :locals => {:block => block} - end - end - def copy_from_with_container(block) copy_from_without_container(block) children_settings = block.children_settings -- libgit2 0.21.2