<commit_before>class Users::RegistrationsController < Devise::RegistrationsController
  def new
    redirect_to new_user_session_path if User.count > 0
  end
end
<commit_msg>Added custom parameters to devise parameter_sanitizer. Closes #767.<commit_after>class Users::RegistrationsController < Devise::RegistrationsController
  before_filter :configure_permitted_parameters, if: :devise_controller?

  def new
    redirect_to new_user_session_path if User.count > 0
  end

  protected

  def configure_permitted_parameters
    devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:password, :password_confirmation, :name, :username, :email, :remember_me) }
  end
end

{'fraction_non_alphanumeric': 0.07462686567164178, 'fraction_numerical': 0.007462686567164179, 'mean_word_length': 6.373626373626373, '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': '3100741', 'n_tokens_mistral': 211, 'n_tokens_neox': 201, 'n_words': 47}