lib/comfortable_mexican_sofa/view_methods.rb
# Content of a page block. This is how you get content from page:field
# Example:
#   cms_page_content(:left_column, CmsPage.first)
#   cms_page_content(:left_column) # if @cms_page is present
Content of a page block.
Content of a page block .
def cms_page_content(block_label, page = nil)
    return '' unless page ||= @cms_page
    return '' unless block = page.cms_blocks.find_by_label(block_label)
    block.content.to_s.html_safe
  end
def cms_page_content ( block_label , page = nil ) return '' unless page ||= @cms_page return '' unless block = page . cms_blocks . find_by_label ( block_label ) block . content . to_s . html_safe end
Content of a page block.
Content of a page block .
block_label
<not_specific>
page
<not_specific>