<commit_before>class EventsController < ApplicationController

  def index
    @user = User.find(params[:user_id])
    ## Put badass query here to generate event
    render json: {user: @user, event: event}
  end

  def show
  end

end<commit_msg>handlebars introduced to project, not fully-integrated<commit_after>class EventsController < ApplicationController
  before_action :allow_cross_domain

  def index
    @event = Event.all.sample
    @user = User.find(params[:user_id])
    ## Put badass query here to generate event
    render json: {user: @user, event: @event}
  end

  def show
  end

  private

    def allow_cross_domain
      headers['Access-Control-Allow-Origin'] = '*'
      headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, PATCH, DELETE, OPTIONS'
      headers['Access-Control-Allow-Headers'] = 'Origin, Content-Type, Accept, Authorization, Token'
    end

end
{'fraction_non_alphanumeric': 0.10224719101123596, 'fraction_numerical': 0.0, 'mean_word_length': 3.842391304347826, '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': '1557656', 'n_tokens_mistral': 271, 'n_tokens_neox': 261, 'n_words': 76}