Sha256: 13676cba6a3e014e975d9ce51246562d6be6768f0cba7e910f54e537f4cdfa04

Contents?: true

Size: 394 Bytes

Versions: 56

Compression:

Stored size: 394 Bytes

Contents

# frozen_string_literal: true

module ActionText
  module Attachments
    module Minification
      extend ActiveSupport::Concern

      class_methods do
        def fragment_by_minifying_attachments(content)
          Fragment.wrap(content).replace(ActionText::Attachment.tag_name) do |node|
            node.tap { |n| n.inner_html = "" }
          end
        end
      end
    end
  end
end

Version data entries

56 entries across 53 versions & 6 rubygems

Version Path
actiontext-7.1.3 lib/action_text/attachments/minification.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actiontext-7.0.3.1/lib/action_text/attachments/minification.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actiontext-7.0.2.3/lib/action_text/attachments/minification.rb
actiontext-7.1.2 lib/action_text/attachments/minification.rb
actiontext-7.1.1 lib/action_text/attachments/minification.rb
actiontext-7.1.0 lib/action_text/attachments/minification.rb
actiontext-7.1.0.rc2 lib/action_text/attachments/minification.rb
actiontext-7.1.0.rc1 lib/action_text/attachments/minification.rb
actiontext-7.1.0.beta1 lib/action_text/attachments/minification.rb
actiontext-7.0.8 lib/action_text/attachments/minification.rb
actiontext-7.0.7.2 lib/action_text/attachments/minification.rb
actiontext-7.0.7.1 lib/action_text/attachments/minification.rb
actiontext-7.0.7 lib/action_text/attachments/minification.rb
actiontext-7.0.6 lib/action_text/attachments/minification.rb
actiontext-7.0.5.1 lib/action_text/attachments/minification.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/actiontext-7.0.2.3/lib/action_text/attachments/minification.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/actiontext-7.0.3.1/lib/action_text/attachments/minification.rb
actiontext-7.0.5 lib/action_text/attachments/minification.rb
actiontext-7.0.4.3 lib/action_text/attachments/minification.rb
actiontext-7.0.4.2 lib/action_text/attachments/minification.rb