<commit_before>class Admin::AdminController < ApplicationController
  layout 'admin'
  before_filter :authenticate_user!

  rescue_from CanCan::AccessDenied do |exception|
    redirect_to request.referrer, :alert => case exception.action
      when :destroy
        "You are not authorized to destroy that record"
      else
        exception.message
      end
  end
end
<commit_msg>If no referrer set, redirect to admin_root<commit_after>class Admin::AdminController < ApplicationController
  layout 'admin'
  before_filter :authenticate_user!

  rescue_from CanCan::AccessDenied do |exception|
    redirect_to request.referrer || admin_root_path, :alert => case exception.action
      when :destroy
        "You are not authorized to destroy that record"
      else
        exception.message
      end
  end
end

{'fraction_non_alphanumeric': 0.06265356265356266, 'fraction_numerical': 0.0, 'mean_word_length': 3.657142857142857, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7545478', 'n_tokens_mistral': 219, 'n_tokens_neox': 218, 'n_words': 69}