<commit_before>class Member::RegistrationsController < Devise::RegistrationsController
  include MemberSignup

  prepend_before_action :authenticate_scope!, only: [:show, :edit, :update, :destroy]
  before_action :configure_sign_up_params, only: [:create]
  before_action :configure_account_update_params, only: [:update]
  
  # GET /resource/sign_up
  def new
    super
  end

  def show
  end

  # POST /resource
  def create
    begin
      super
    rescue ActiveRecord::RecordInvalid, ActiveRecord::RecordNotUnique => e
      resource.errors.add(:email, I18n.t(:not_unique, scope:[:errors, :common])) if e.is_a?(ActiveRecord::RecordNotUnique)
      respond_with resource
    end
  end

  # GET /resource/edit
  def edit
    super
  end

  # PUT /resource
  def update
    super
  end

  # DELETE /resource
  def destroy
    super
  end

  # GET /resource/cancel
  # Forces the session data which is usually expired after sign
  # in to be expired now. This is useful if the user wants to
  # cancel oauth signing in/up in the middle of the process,
  # removing all OAuth session data.
  def cancel
    super
  end

  protected

  # If you have extra params to permit, append them to the sanitizer.
  def configure_sign_up_params
    devise_parameter_sanitizer.for(:sign_up).concat([:email, :first_name, :last_name, :phone, :postal_code])
  end

  # If you have extra params to permit, append them to the sanitizer.
  def configure_account_update_params
    devise_parameter_sanitizer.for(:account_update).concat([:email, :first_name, :last_name, :phone, :postal_code])
  end

  # The path used after sign up.
  def after_sign_up_path_for(resource)
    start_signup_for(resource)
    begin_member_signup
  end

  # The path used after sign up for inactive accounts.
  def after_inactive_sign_up_path_for(resource)
    show_member_registration_path
  end
<commit_msg>Corrected Devise permit<commit_after>class Member::RegistrationsController < Devise::RegistrationsController
  include MemberSignup

  prepend_before_action :authenticate_scope!, only: [:show, :edit, :update, :destroy]
  before_action :configure_sign_up_params, only: [:create]
  before_action :configure_account_update_params, only: [:update]
  
  # GET /resource/sign_up
  def new
    super
  end

  def show
  end

  # POST /resource
  def create
    begin
      super
    rescue ActiveRecord::RecordInvalid, ActiveRecord::RecordNotUnique => e
      resource.errors.add(:email, I18n.t(:not_unique, scope:[:errors, :common])) if e.is_a?(ActiveRecord::RecordNotUnique)
      respond_with resource
    end
  end

  # GET /resource/edit
  def edit
    super
  end

  # PUT /resource
  def update
    super
  end

  # DELETE /resource
  def destroy
    super
  end

  # GET /resource/cancel
  # Forces the session data which is usually expired after sign
  # in to be expired now. This is useful if the user wants to
  # cancel oauth signing in/up in the middle of the process,
  # removing all OAuth session data.
  def cancel
    super
  end

  protected

  # If you have extra params to permit, append them to the sanitizer.
  def configure_sign_up_params
    devise_parameter_sanitizer.permit(:sign_up, keys: [:email, :first_name, :gender, :last_name, :phone, :postal_code])
  end

  # If you have extra params to permit, append them to the sanitizer.
  def configure_account_update_params
    devise_parameter_sanitizer.permit(:account_update, keys: [:email, :first_name, :gender, :last_name, :phone, :postal_code])
  end

  # The path used after sign up.
  def after_sign_up_path_for(resource)
    begin_member_signup
  end

  # The path used after sign up for inactive accounts.
  def after_inactive_sign_up_path_for(resource)
    show_member_registration_path
  end

{'fraction_non_alphanumeric': 0.07373764360138926, 'fraction_numerical': 0.0010686615014694097, 'mean_word_length': 3.875, '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': '7481002', 'n_tokens_mistral': 1207, 'n_tokens_neox': 1165, 'n_words': 359}