aboutsummaryrefslogtreecommitdiffstats
path: root/actiontext/app
diff options
context:
space:
mode:
authorJavan Makhmali <javan@javan.us>2019-01-26 09:04:47 -0500
committerGitHub <noreply@github.com>2019-01-26 09:04:47 -0500
commitd90593d0deabb90ac5cfdf767f2f037337bb4d31 (patch)
tree669f7b661cf7298b2771224e2e385f8f82bad660 /actiontext/app
parent5fe6d3747efd37d7d8c6c9d6557d7b623e0398e8 (diff)
parent48c6ef9a7236a17799bb5d217fef721afdf06f44 (diff)
downloadrails-d90593d0deabb90ac5cfdf767f2f037337bb4d31.tar.gz
rails-d90593d0deabb90ac5cfdf767f2f037337bb4d31.tar.bz2
rails-d90593d0deabb90ac5cfdf767f2f037337bb4d31.zip
Merge pull request #35057 from javan/actiontext/blob-embeds-only
Fix error saving Action Text content containing non-blob attachables
Diffstat (limited to 'actiontext/app')
-rw-r--r--actiontext/app/models/action_text/rich_text.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actiontext/app/models/action_text/rich_text.rb b/actiontext/app/models/action_text/rich_text.rb
index 1f39bc51b9..19fa3e030e 100644
--- a/actiontext/app/models/action_text/rich_text.rb
+++ b/actiontext/app/models/action_text/rich_text.rb
@@ -15,7 +15,7 @@ module ActionText
has_many_attached :embeds
before_save do
- self.embeds = body.attachments.map(&:attachable) if body.present?
+ self.embeds = body.attachables.grep(ActiveStorage::Blob) if body.present?
end
def to_plain_text