<commit_before>class ApplicationController < ActionController::Base
  protect_from_forgery

  rescue_from Exception, :with => :render_error

  protected

  def render_error
    render :template => "/admin/errors/500", :layout => 'admin/box', :status => 500
  end
end
<commit_msg>Very useful to see errors in dev and test envs<commit_after>class ApplicationController < ActionController::Base
  protect_from_forgery

  protected

  unless Rails.env.development? || Rails.env.test?
    rescue_from Exception, :with => :render_error

    def render_error
      render :template => "/admin/errors/500", :layout => 'admin/box', :status => 500
    end
  end
end

{'fraction_non_alphanumeric': 0.10365853658536585, 'fraction_numerical': 0.018292682926829267, 'mean_word_length': 4.341463414634147, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '4320016', 'n_tokens_mistral': 205, 'n_tokens_neox': 187, 'n_words': 53}