<commit_before>require_dependency "subscribem/application_controller"

module Subscribem
  class Account::UsersController < ApplicationController
    def new
      @user = Subscribem::User.new
    end


  end
end
<commit_msg>apply signup<commit_after>require_dependency "subscribem/application_controller"

module Subscribem
  class Account::UsersController < Subscribem::ApplicationController
    def new
      @user = Subscribem::User.new
    end

    def create
      account = Subscribem::Account.find_by(:subdomain => request.subdomain)
      user = account.users.create(user_params)
      force_authentication!(account, user)
      flash[:success] = "You have signed up successfully."
      redirect_to root_path
    end

    private

    def user_params
      params.require(:user).permit(:email, :password, :password_confirmation)
    end

  end
end

{'fraction_non_alphanumeric': 0.07925407925407925, 'fraction_numerical': 0.0, 'mean_word_length': 3.9367816091954024, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '5996233', 'n_tokens_mistral': 247, 'n_tokens_neox': 238, 'n_words': 54}