aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2018-05-28 17:44:19 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2018-05-28 17:44:19 +0200
commit751d5edc70f67a6b29571a2005b700781ffec075 (patch)
treeac03a5ac57f0c40ffd5a1c06b809344243850480 /app
parent69daf8f21dbceaa2414d17af46c5fd72e8d0050e (diff)
downloadrails-751d5edc70f67a6b29571a2005b700781ffec075.tar.gz
rails-751d5edc70f67a6b29571a2005b700781ffec075.tar.bz2
rails-751d5edc70f67a6b29571a2005b700781ffec075.zip
Ease the rendering of a rich text attribute
Diffstat (limited to 'app')
-rw-r--r--app/models/action_text/rich_text.rb1
1 files changed, 1 insertions, 0 deletions
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