<commit_before>require 'responders'

module Intermodal
  class APIController < ActionController::Metal

    include ActionController::Rendering
    include ActionController::Renderers
    include ActionController::RackDelegation
    include ActionController::Head
    include ActionController::MimeResponds

    include ActionController::Instrumentation
    include AbstractController::Callbacks
    include ActionController::Rescue

    include ActionController::RespondWith
    include Intermodal::Controllers::Presentation

    use_renderers :json, :xml

    self.responder = Intermodal::ResourceResponder

    # Major hax
    def render_to_body(options)
      _handle_render_options(options)
    end

    ActiveSupport.run_load_hooks(:intermodal_api_controller, self)
  end
end<commit_msg>[CONTROLLERS] Rails 4.2 metal controllers need a different stack<commit_after>require 'responders'

module Intermodal
  class APIController < ActionController::Metal

    include AbstractController::Rendering
    include ActionController::Rendering
    include ActionController::Renderers
    include ActionController::RackDelegation
    include ActionController::Head
    include ActionController::MimeResponds

    include ActionController::Instrumentation
    include AbstractController::Callbacks
    include ActionController::Rescue

    include ActionController::RespondWith
    include Intermodal::Controllers::Presentation

    use_renderers :json, :xml

    self.responder = Intermodal::ResourceResponder

    ActiveSupport.run_load_hooks(:intermodal_api_controller, self)
  end
end
{'fraction_non_alphanumeric': 0.059343434343434344, 'fraction_numerical': 0.0012626262626262627, 'mean_word_length': 5.443089430894309, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6636841', 'n_tokens_mistral': 408, 'n_tokens_neox': 395, 'n_words': 87}