<commit_before>class SessionsController < ApplicationController

  def new
    redirect_to curr_user_path if session[:user_id]
  end

  def create
    user = User.find_by(username: params[:session][:username])
    if user && user.authenticate(params[:session][:password])
      session[:user_id] = user.id
      redirect_to root_url
    else
      session[:message] = "invalid username and/or password"
      redirect_to new_session_path
    end
  end

  def destroy
    session.delete(:user_id)
    redirect_to root_url
  end

end<commit_msg>Removed index action from sessions controller<commit_after>class SessionsController < ApplicationController


  def create
    user = User.find_by(username: params[:session][:username])
    if user && user.authenticate(params[:session][:password])
      session[:user_id] = user.id
    else
      session[:message] = "invalid username and/or password"
    end
    redirect root
  end

  def destroy
    session.delete(:user_id)
    redirect_to root_url
  end

end
{'fraction_non_alphanumeric': 0.08648111332007952, 'fraction_numerical': 0.0, 'mean_word_length': 3.727699530516432, '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': '3937853', 'n_tokens_mistral': 299, 'n_tokens_neox': 289, 'n_words': 73}