aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2018-05-28 17:44:02 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2018-05-28 17:44:02 +0200
commit69daf8f21dbceaa2414d17af46c5fd72e8d0050e (patch)
tree17ac4f286e665df1ac6cd70f78f3dfe192ead648 /app
parentff5ae47a4bfb8fb71aea883b42372fc500b75ce5 (diff)
downloadrails-69daf8f21dbceaa2414d17af46c5fd72e8d0050e.tar.gz
rails-69daf8f21dbceaa2414d17af46c5fd72e8d0050e.tar.bz2
rails-69daf8f21dbceaa2414d17af46c5fd72e8d0050e.zip
Link rich text to owning record
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 7c5211a67e..8ef3436cc2 100644
--- a/app/models/action_text/rich_text.rb
+++ b/app/models/action_text/rich_text.rb
@@ -3,6 +3,7 @@ class ActionText::RichText < ActiveRecord::Base
serialize :body, ActionText::Content
+ belongs_to :record, polymorphic: true, touch: true
has_many_attached :embeds
after_save do