Module: MicroCms::CmsBlockHelper

Defined in:
app/helpers/micro_cms/cms_block_helper.rb

Instance Method Summary collapse

Instance Method Details

#cms_block(path, default = nil, &block) ⇒ Object



5
6
7
8
9
# File 'app/helpers/micro_cms/cms_block_helper.rb', line 5

def cms_block(path, default = nil, &block)
  content_block = content_block_for_path(path, default: capture_default(default, &block))

  render partial: 'micro_cms/content_block', locals: { content_block: content_block }
end

#cms_content(path, default = nil, &block) ⇒ Object



11
12
13
14
15
# File 'app/helpers/micro_cms/cms_block_helper.rb', line 11

def cms_content(path, default = nil, &block)
  content_block = content_block_for_path(path, default: capture_default(default, &block))

   :div, content_block.content, nil, false
end