<commit_before>require 'casino'

class CASino::ApplicationController < ::ApplicationController
  include ApplicationHelper

  layout 'application'

  unless Rails.env.development?
    rescue_from ActionView::MissingTemplate, with: :missing_template
  end

  def cookies
    super
  end

  protected
  def missing_template(exception)
    render plain: 'Format not supported', status: :not_acceptable
  end
end<commit_msg>Explicitly respond with 406 status because this changed in Rails 5.0 - https://github.com/rails/rails/issues/20666<commit_after>require 'casino'

class CASino::ApplicationController < ::ApplicationController
  include ApplicationHelper

  layout 'application'

  rescue_from ActionController::UnknownFormat do
    head :not_acceptable
  end

  unless Rails.env.development?
    rescue_from ActionView::MissingTemplate, with: :missing_template
  end

  def cookies
    super
  end

  protected
  def missing_template(exception)
    render plain: 'Format not supported', status: :not_acceptable
  end
end
{'fraction_non_alphanumeric': 0.0675146771037182, 'fraction_numerical': 0.009784735812133072, 'mean_word_length': 4.845714285714286, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '407484', 'n_tokens_mistral': 295, 'n_tokens_neox': 269, 'n_words': 80}