From 69daf8f21dbceaa2414d17af46c5fd72e8d0050e Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 28 May 2018 17:44:02 +0200 Subject: Link rich text to owning record --- app/models/action_text/rich_text.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/models/action_text') 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 -- cgit v1.2.3