<commit_before>class UpdatesController < ApplicationController
  inherit_resources
  load_and_authorize_resource

  actions :index, :create, :destroy
  respond_to :html, only: [ :index, :create, :destroy ]
  belongs_to :project

  def index
    index! do |format|
      format.html{ return render :index, layout: false }
    end
  end

  def create
    @update = parent.updates.new(params[:update])<commit_msg>Making updates#index respond to json<commit_after>class UpdatesController < ApplicationController
  inherit_resources
  load_and_authorize_resource

  actions :index, :create, :destroy
  respond_to :html, only: [ :index, :create, :destroy ]
  respond_to :json, only: [:index]
  belongs_to :project

  def index
    index! do |format|
      format.html{ return render :index, layout: false }
    end
  end

  def create
    @update = parent.updates.new(params[:update])
{'fraction_non_alphanumeric': 0.09453302961275627, 'fraction_numerical': 0.0, 'mean_word_length': 4.263473053892215, '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': '1065511', 'n_tokens_mistral': 270, 'n_tokens_neox': 264, 'n_words': 75}