<commit_before>require_dependency "ajo_register/application_controller"
class AjoRegister::ConfirmationsController < Devise::ConfirmationsController
  def new
    super
  end

  def create
    self.resource = resource_class.send_confirmation_instructions(resource_params)

    if successfully_sent?(resource)
      respond_with({}, :location => after_resending_confirmation_instructions_path_for(resource_name))
    else
      respond_with(resource)
    end
  end

  def show
    self.resource = resource_class.confirm_by_token(params[:confirmation_token])
    if resource.errors.empty?
      set_flash_message(:notice, :confirmed) if is_navigational_format?
      sign_in(resource_name, resource)
      redirect_to main_app.double_opt_in_path
    else
      respond_with_navigational(resource.errors, :status => :unprocessable_entity){ render :new }
    end
  end

  def destroy
    super
  end

  def edit
    super
  end

  def update
    super
  end

end<commit_msg>remove facebook required password<commit_after>require_dependency "ajo_register/application_controller"
class AjoRegister::ConfirmationsController < Devise::ConfirmationsController
  def new
    super
  end

  def create
    self.resource = resource_class.send_confirmation_instructions(resource_params)

    if successfully_sent?(resource)
      respond_with({}, :location => after_resending_confirmation_instructions_path_for(resource_name))
    else
      respond_with(resource)
    end
  end

  def show
    self.resource = resource_class.confirm_by_token(params[:confirmation_token])
    if resource.errors.empty?
      set_flash_message(:notice, :confirmed) if is_navigational_format?
      sign_in(resource_name, resource)
      if resource.source == 'facebook'
        redirect_to main_app.double_opt_in_path(:facebook => true)
      else
        redirect_to main_app.double_opt_in_path
      end
    else
      redirect_to main_app.root_path
    end
  end

  def destroy
    super
  end

  def edit
    super
  end

  def update
    super
  end

end
{'fraction_non_alphanumeric': 0.0626232741617357, 'fraction_numerical': 0.0, 'mean_word_length': 3.9367396593673964, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2010609', 'n_tokens_mistral': 608, 'n_tokens_neox': 592, 'n_words': 121}