1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/lib/action_text/attachments/minification.rb
Alberto Almagro 34f2e9492b Add frozen_string_literal: true
Adds frozen_string_literal: true comment on top of all currently existing files
2018-10-08 23:44:25 +02:00

17 lines
395 B
Ruby

# 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::SELECTOR) do |node|
node.tap { |n| n.inner_html = "" }
end
end
end
end
end
end