aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/action_text/rich_text.rb
blob: a56a18efda767f943483d42386127d582c1f4d2e (plain) (blame)
1
2
3
4
5
6
7
8
9
class ActionText::RichText < ActiveRecord::Base
  serialize :body, ActionText::Content
  
  has_many_attached :embeds

  after_save do
    self.embeds_attachments_blobs = body.attachments.map(&:attachable)
  end
end