Add statuses

This commit is contained in:
2023-02-27 21:02:38 +11:00
parent 23d03d2be1
commit f1c3263922
10 changed files with 81 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
# auto_register: false
require "rexml/parsers/pullparser"
require "sanitize"
module Adamantium
module Decorators
@@ -58,6 +59,10 @@ module Adamantium
photos? ? "<div>#{photos.map { |p| "<img src='#{p["value"]}'/>" }.join("")} #{content}</div>" : content
end
def raw_content
Sanitize.fragment(content)
end
def excerpt
truncate_html(content, 140, true)
end