Sha256: 8b591a0828da0892ffbe25335bcd1843307d39cdf48558546fae929d807ba4fe

Contents?: true

Size: 393 Bytes

Versions: 1

Compression:

Stored size: 393 Bytes

Contents

module Smithy
  class PageContentWrapper
    attr_reader :page_content
    include ActionView::Helpers::TagHelper

    def initialize(page_content)
      @page_content = page_content
    end

    def wrap(output)
      return output if !page_content.persisted?
      content_tag(:div, output.html_safe, id: "page_content_#{page_content.id}", class: page_content.css_classes)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
smithycms-0.8.1 lib/smithy/page_content_wrapper.rb