<commit_before>require 'active_decorator/view_context'
require 'rails'

module ActiveDecorator
  class Railtie < ::Rails::Railtie
    initializer 'active_decorator' do
      ActiveSupport.on_load(:action_view) do
        require 'active_decorator/monkey/action_view/partial_renderer'
      end
      ActiveSupport.on_load(:action_controller) do
        require 'active_decorator/monkey/abstract_controller/rendering'
        ActionController::Base.send :include, ActiveDecorator::ViewContext::Filter
      end
      ActiveSupport.on_load(:action_mailer) do
        require 'active_decorator/monkey/abstract_controller/rendering'
        ActionMailer::Base.send :include, ActiveDecorator::ViewContext::Filter
      end
    end
  end
end<commit_msg>Filters are not supported in ActionMailer < 4<commit_after>require 'active_decorator/view_context'
require 'rails'

module ActiveDecorator
  class Railtie < ::Rails::Railtie
    initializer 'active_decorator' do
      ActiveSupport.on_load(:action_view) do
        require 'active_decorator/monkey/action_view/partial_renderer'
      end
      ActiveSupport.on_load(:action_controller) do
        require 'active_decorator/monkey/abstract_controller/rendering'
        ActionController::Base.send :include, ActiveDecorator::ViewContext::Filter
      end
      ActiveSupport.on_load(:action_mailer) do
        if ActionMailer::Base.respond_to? :before_action
          require 'active_decorator/monkey/abstract_controller/rendering'
          ActionMailer::Base.send :include, ActiveDecorator::ViewContext::Filter
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.07879924953095685, 'fraction_numerical': 0.0006253908692933083, 'mean_word_length': 4.111821086261981, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1340441', 'n_tokens_mistral': 465, 'n_tokens_neox': 458, 'n_words': 81}