<commit_before>class <%= resource_pluralize.capitalize %>Controller < ApplicationController

  def new
    @<%= resource_name %> = <%= resource_name.classify %>.new
  end

  def create
    @<%= resource_name %> = <%= resource_name.classify %>.new <%= resource_name %>_params

    if @<%= resource_name %>.save
      redirect_to root_url, notice: t('.sign_up')
    else
      render :new
    end
  end

private
  def <%= resource_name %>_params
    params.require(:<%= resource_name %>).permit :email, :password, :password_confirmation
  end

end<commit_msg>Set model id in session after create<commit_after>class <%= resource_pluralize.capitalize %>Controller < ApplicationController

  def new
    @<%= resource_name %> = <%= resource_name.classify %>.new
  end

  def create
    @<%= resource_name %> = <%= resource_name.classify %>.new <%= resource_name %>_params

    if @<%= resource_name %>.save
      session[:<%=resource_name %>_id] = <%= resource_name %>.id
      redirect_to root_url, notice: t('.sign_up')
    else
      render :new
    end
  end

private
  def <%= resource_name %>_params
    params.require(:<%= resource_name %>).permit :email, :password, :password_confirmation
  end

end
{'fraction_non_alphanumeric': 0.14226289517470883, 'fraction_numerical': 0.0, 'mean_word_length': 3.812, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 23, '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': '5395508', 'n_tokens_mistral': 418, 'n_tokens_neox': 365, 'n_words': 91}