<commit_before>class ResponseExportsController < ApplicationController
  after_action :verify_authorized, :except => 
    [:index, :project_long_format_responses, :project_wide_format_responses, :instrument_long_format_responses,
      :instrument_wide_format_responses, :project_response_images, :instrument_response_images]
  
  def index
    @project_exports = current_project.response_exports.order('created_at DESC')
    @instrument_exports = current_project.instrument_response_exports
  end
  
  def new
    @project = current_project
    @export = current_project.response_exports.new
    authorize @export
  end
  
  def create
    @export = current_project.response_exports.new(params[:export])
    authorize @export
    if @export.save
      render text:"", notice: "Successfully created export."
    else
      render :new
    end
  end
  
  def edit
    @project = current_project
    @export = current_project.response_exports.find(params[:id])
    authorize @export<commit_msg>limit number of exports available<commit_after>class ResponseExportsController < ApplicationController
  after_action :verify_authorized, :except => 
    [:index, :project_long_format_responses, :project_wide_format_responses, :instrument_long_format_responses,
      :instrument_wide_format_responses, :project_response_images, :instrument_response_images]
  
  def index
    @project_exports = current_project.response_exports.order('created_at DESC').limit(10)
    @instrument_exports = current_project.instrument_response_exports.take(10)
  end
  
  def new
    @project = current_project
    @export = current_project.response_exports.new
    authorize @export
  end
  
  def create
    @export = current_project.response_exports.new(params[:export])
    authorize @export
    if @export.save
      render text:"", notice: "Successfully created export."
    else
      render :new
    end
  end
  
  def edit
    @project = current_project
    @export = current_project.response_exports.find(params[:id])
    authorize @export
{'fraction_non_alphanumeric': 0.07711319822046465, 'fraction_numerical': 0.001977261492832427, 'mean_word_length': 4.545205479452055, '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': '816591', 'n_tokens_mistral': 590, 'n_tokens_neox': 583, 'n_words': 117}