<commit_before>class ApplicationController < ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :exception
  load_and_authorize_resource unless: :devise_controller?

  # Cancan permission denied redirect
  rescue_from CanCan::AccessDenied do |exception|
    redirect_to new_user_registration_path, :alert => exception.message
  end

  # Strong params for devise
  before_filter :configure_permitted_parameters, if: :devise_controller?

  protected

  # Strong params helper method for devise
  def configure_permitted_parameters
    devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:name, :email) }
  end
end
<commit_msg>Broke devise even more with last commit. fixed now (™)<commit_after>class ApplicationController < ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :exception
  load_and_authorize_resource unless: :devise_controller?

  # Cancan permission denied redirect
  rescue_from CanCan::AccessDenied do |exception|
    redirect_to new_user_registration_path, :alert => exception.message
  end

  # Strong params for devise
  before_filter :configure_permitted_parameters, if: :devise_controller?

  protected

  # Strong params helper method for devise
  def configure_permitted_parameters
    devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:password, :password_confirmation, :name, :email) }
  end
end

{'fraction_non_alphanumeric': 0.06718346253229975, 'fraction_numerical': 0.0, 'mean_word_length': 5.481171548117155, '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': '1998619', 'n_tokens_mistral': 460, 'n_tokens_neox': 441, 'n_words': 133}