Sha256: d965db83ecc8f463f93885f4a1c467673dc32c23bc5fd8ea7ddb025dcd5db0cd
Contents?: true
Size: 752 Bytes
Versions: 21
Compression:
Stored size: 752 Bytes
Contents
# frozen_string_literal: true require 'thredded/email_transformer/onebox' require 'thredded/email_transformer/spoiler' module Thredded # This transformer should applied to emails so that they render correctly in the email clients. # # For example, if you use roadie, you can configure it to use the transformer in the initializer: # # # config/initializers/roadie.rb # Rails.application.config.roadie.before_transformation = Thredded::EmailTransformer # module EmailTransformer class << self attr_accessor :transformers end @transformers = [Onebox, Spoiler] # @param doc [Nokogiri::HTML::Document] def self.call(doc) transformers.each { |transformer| transformer.call(doc) } end end end
Version data entries
21 entries across 21 versions & 1 rubygems