aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/action_text/attribute.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/action_text/attribute.rb b/lib/action_text/attribute.rb
index 30cbab70db..6ed72fd852 100644
--- a/lib/action_text/attribute.rb
+++ b/lib/action_text/attribute.rb
@@ -17,6 +17,7 @@ module ActionText
has_one :"rich_text_#{name}", -> { where(name: name) }, class_name: "ActionText::RichText", as: :record, inverse_of: :record, dependent: :destroy
scope :"with_rich_text_#{name}", -> { includes("rich_text_#{name}") }
+ scope :"with_rich_text_#{name}_and_embeds", -> { includes("rich_text_#{name}": { embeds_attachments: :blob }) }
after_save { public_send(name).save if public_send(name).changed? }
end