diff options
author | Javan Makhmali <javan@javan.us> | 2019-01-26 09:04:47 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-26 09:04:47 -0500 |
commit | d90593d0deabb90ac5cfdf767f2f037337bb4d31 (patch) | |
tree | 669f7b661cf7298b2771224e2e385f8f82bad660 /actiontext/app | |
parent | 5fe6d3747efd37d7d8c6c9d6557d7b623e0398e8 (diff) | |
parent | 48c6ef9a7236a17799bb5d217fef721afdf06f44 (diff) | |
download | rails-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.rb | 2 |
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 |