<commit_before>class RsvpsController < ApplicationController

  # GET /rsvps
  # GET /rsvps.json
  def index
    if session[:logged_in].nil?
      redirect_to '/login'
      return
    end

    @rsvps = Rsvp.order(:name)

    @all_day = @rsvps.select {|x| x.events == "Daytime and Evening" }
    @night_only = @rsvps.select {|x| x.events == "Evening Only" }
    @not_coming = @rsvps.select { |x| x.events == "Sorry, can't make it" }

    @guests = @rsvps.map { |x| x.guests }.reduce(:+)
    @total = @rsvps.count + @guests - @not_coming.count

  end

  # POST /rsvps
  # POST /rsvps.json<commit_msg>Patched rsvp controller to fix production error<commit_after>class RsvpsController < ApplicationController

  # GET /rsvps
  # GET /rsvps.json
  def index
    if session[:logged_in].nil?
      redirect_to '/login'
      return
    end

    @rsvps = Rsvp.order(:name)

    @all_day = @rsvps.select {|x| x.events == "Daytime and Evening" }
    @night_only = @rsvps.select {|x| x.events == "Evening Only" }
    @not_coming = @rsvps.select { |x| x.events == "Sorry, can't make it" }

    @guests = @rsvps.map { |x| x.guests }.select { |x| x != nil? }.reduce(:+)
    @total = @rsvps.count + @guests - @not_coming.count

  end

  # POST /rsvps
  # POST /rsvps.json
{'fraction_non_alphanumeric': 0.15274463007159905, 'fraction_numerical': 0.0, 'mean_word_length': 2.882716049382716, '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': '5197859', 'n_tokens_mistral': 507, 'n_tokens_neox': 484, 'n_words': 113}