Sha256: 2028b460e0297699e23c547b1ab277ce47d0cbab7191af7f8fa1248148878c6d

Contents?: true

Size: 240 Bytes

Versions: 5

Compression:

Stored size: 240 Bytes

Contents

module PagesCms
  module RenderContent
    def content=(value)
      old = value
      new = ::Redcarpet::Markdown.new(::Redcarpet::Render::HTML).render(value)
      self[:content_rendered] = new
      self[:content] = old
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pages_cms-0.1.1 app/models/pages_cms/render_content.rb
pages_cms-0.1.0 app/models/pages_cms/render_content.rb
pages_cms-0.0.3 app/models/pages_cms/render_content.rb
pages_cms-0.0.2 app/models/pages_cms/render_content.rb
pages_cms-0.0.1 app/models/pages_cms/render_content.rb