<commit_before>module Nyauth
  class NewPasswordsController < ApplicationController
    include Nyauth::ApplicationConcern
    include Nyauth::ClientConcern
    allow_everyone
    respond_to :html, :json
    before_action :set_client

    def edit
    end

    def update
      @client.update_new_password(client_params)
      respond_with(@client, location: nyauth.new_session_path)
    end

    private

    def set_client
      @client = client_class.find_by!(new_password_key: params[:new_password_key])
    end

    def client_params
      params.fetch(client_param_name, {})
            .permit(:password, :password_confirmation)
    end
  end
end<commit_msg>No need to specify engine's name when use url_helpers inside engine<commit_after>module Nyauth
  class NewPasswordsController < ApplicationController
    include Nyauth::ApplicationConcern
    include Nyauth::ClientConcern
    allow_everyone
    respond_to :html, :json
    before_action :set_client

    def edit
    end

    def update
      @client.update_new_password(client_params)
      respond_with(@client, location: new_session_path)
    end

    private

    def set_client
      @client = client_class.find_by!(new_password_key: params[:new_password_key])
    end

    def client_params
      params.fetch(client_param_name, {})
            .permit(:password, :password_confirmation)
    end
  end
end
{'fraction_non_alphanumeric': 0.06390704429920116, 'fraction_numerical': 0.0, 'mean_word_length': 3.503267973856209, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '2553213', 'n_tokens_mistral': 410, 'n_tokens_neox': 397, 'n_words': 89}