diff options
-rw-r--r-- | app/models/action_text/rich_text.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/action_text/rich_text.rb b/app/models/action_text/rich_text.rb index e4fc178ba4..6747def9a5 100644 --- a/app/models/action_text/rich_text.rb +++ b/app/models/action_text/rich_text.rb @@ -2,7 +2,6 @@ class ActionText::RichText < ActiveRecord::Base self.table_name = "action_text_rich_texts" serialize :body, ActionText::Content - delegate :to_s, to: :body belongs_to :record, polymorphic: true, touch: true has_many_attached :embeds @@ -10,4 +9,9 @@ class ActionText::RichText < ActiveRecord::Base after_save do self.embeds_blobs = body.attachments.map(&:attachable) end + + + def to_s + body.to_s.html_safe + end end |