From 751d5edc70f67a6b29571a2005b700781ffec075 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 28 May 2018 17:44:19 +0200 Subject: Ease the rendering of a rich text attribute --- app/models/action_text/rich_text.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app') diff --git a/app/models/action_text/rich_text.rb b/app/models/action_text/rich_text.rb index 8ef3436cc2..efc35a6465 100644 --- a/app/models/action_text/rich_text.rb +++ b/app/models/action_text/rich_text.rb @@ -2,6 +2,7 @@ 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 -- cgit v1.2.3