<commit_before>class ApplicationController < ActionController::Base
  protect_from_forgery
  prepend_before_filter :login_required
  helper_method :logged_in?

  def logged_in?
    !!current_user
  end

  def current_user
    @user ||= User.where(:id => session[:user_id])
  end

  def login_required
    redirect_to root_path unless current_user
  end
end<commit_msg>forgot to apply .first to current_user method<commit_after>class ApplicationController < ActionController::Base
  protect_from_forgery
  prepend_before_filter :login_required
  helper_method :logged_in?

  def logged_in?
    !!current_user
  end

  def current_user
    @user ||= User.where(:id => session[:user_id]).first
  end

  def login_required
    redirect_to root_path unless current_user
  end
end
{'fraction_non_alphanumeric': 0.06718346253229975, 'fraction_numerical': 0.0, 'mean_word_length': 4.827067669172933, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6875726', 'n_tokens_mistral': 244, 'n_tokens_neox': 237, 'n_words': 57}