cb0e9b9962
Reverts #2001 Restores #1955
21 lines
532 B
Ruby
21 lines
532 B
Ruby
module ActionText
|
|
module Extensions
|
|
module RichText
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
# This overrides the default :embeds association!
|
|
has_many_attached :embeds do |attachable|
|
|
::Attachments::VARIANTS.each do |variant_name, variant_options|
|
|
attachable.variant variant_name, **variant_options, process: :immediately
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
ActiveSupport.on_load(:action_text_rich_text) do
|
|
include ActionText::Extensions::RichText
|
|
end
|