29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# File 'app/helpers/cms/rendering_helper.rb', line 29
def render_connectable(content_block)
if content_block
if content_block.class.renderable?
logger.debug "Rendering connectable #{content_block.class} ##{content_block.id} #{"v#{content_block.version}" if content_block.respond_to?(:version)}"
content_block.perform_render(controller)
else
logger.warn "Connectable #{content_block.class} ##{content_block.id} is not renderable"
end
else
logger.warn "Connectable is null"
end
rescue Exception => e
logger.error "Error occurred while rendering #{content_block.class}##{content_block.id}: #{e.message}\n#{e.backtrace.join("\n")}"
"ERROR: #{e.message}"
end
|