Sha256: 6ccfcdd3fb20dd72621e4801dc766200e1e715f2d85ae15aa6d7a43f68c52f42
Contents?: true
Size: 331 Bytes
Versions: 4
Compression:
Stored size: 331 Bytes
Contents
module DocumentsHelper # Convert plain text to HTML by cwaddingAdd <p> tags around paragraphs def to_html(text) return '' if text.blank? text.split("\n").collect { |p| "<p>#{p}</p>"}.join("\n").html_safe end def document_path(document) document.is_a?(Document) ? document.permalink : super(document) end end
Version data entries
4 entries across 4 versions & 1 rubygems