<commit_before>class EventsController < ApplicationController

  def index
    @events = Event.includes(:eventable).order("event_date DESC")#.map{|event| event.eventable}
  end

end
<commit_msg>Make date select for event list work<commit_after>class EventsController < ApplicationController

  def index
    @date = (if params[:date]
      Date.civil(params[:date][:year].to_i,params[:date][:month].to_i,params[:date][:day].to_i)
    else
      Date.today
    end) + 1
    @events = Event.where("event_date < ?", @date).includes(:eventable).order("event_date DESC")
  end

end

{'fraction_non_alphanumeric': 0.14038128249566725, 'fraction_numerical': 0.0017331022530329288, 'mean_word_length': 4.7227722772277225, 'pattern_counts': {'":': 0, '<': 6, '<?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': '7041283', 'n_tokens_mistral': 189, 'n_tokens_neox': 181, 'n_words': 36}