<commit_before>class EventsController < ApplicationController
  before_action :find_user
  def index
    if user_signed_in?
      session[:user_id] = current_user.id
      if current_user.user_addresses.length > 0
        @addressStatus = "true"
      else
        @addressStatus = "false"
      end
      puts "*" * 25
      puts "I'm about to send off the user profile obj"
      puts current_user
      puts "*" * 25
      @user_profile = {
        id: current_user.id,
        addressStatus: @addressStatus,
        friends: current_user.friends,
        addresses: current_user.user_addresses,
        token: form_authenticity_token,
        open_invites: current_user.open_invites,
        pending_events: current_user.pending_events,
        upcoming_events: current_user.upcoming_events
      }
    else
      redirect_to root_path
    end
  end

  def show
    @allEvents = Event.all
    if !user_signed_in?
      redirect_to root_path
    else
      @event = Event.find(params[:id])
      if @event.invitees.include?(current_user)
        @venueChoices = @event.venue_choices
        @bookmarks = current_user.bookmarks
      else
        redirect_to root_pathexit
      end
    end
  end

  def search
    render json: @possibleVenues
  end

  def new
    @event = Event.new
    @friends = current_user.friends
  end

  def create
    form = params[:event]
    @event = Event.new({<commit_msg>remove 'exit' from events controller path<commit_after>class EventsController < ApplicationController
  before_action :find_user
  def index
    if user_signed_in?
      session[:user_id] = current_user.id
      if current_user.user_addresses.length > 0
        @addressStatus = "true"
      else
        @addressStatus = "false"
      end
      puts "*" * 25
      puts "I'm about to send off the user profile obj"
      puts current_user
      puts "*" * 25
      @user_profile = {
        id: current_user.id,
        addressStatus: @addressStatus,
        friends: current_user.friends,
        addresses: current_user.user_addresses,
        token: form_authenticity_token,
        open_invites: current_user.open_invites,
        pending_events: current_user.pending_events,
        upcoming_events: current_user.upcoming_events
      }
    else
      redirect_to root_path
    end
  end

  def show
    @allEvents = Event.all
    if !user_signed_in?
      redirect_to root_path
    else
      @event = Event.find(params[:id])
      if @event.invitees.include?(current_user)
        @venueChoices = @event.venue_choices
        @bookmarks = current_user.bookmarks
      else
        redirect_to root_path
      end
    end
  end

  def search
    render json: @possibleVenues
  end

  def new
    @event = Event.new
    @friends = current_user.friends
  end

  def create
    form = params[:event]
    @event = Event.new({
{'fraction_non_alphanumeric': 0.07274011299435028, 'fraction_numerical': 0.0035310734463276836, 'mean_word_length': 2.438106796116505, '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': '231258', 'n_tokens_mistral': 882, 'n_tokens_neox': 863, 'n_words': 204}