<commit_before>require 'responders/rql'

class ProjectsController < InheritedResources::Base
  responders :rql
  
  respond_to :html, :json
  # layout 'application', :except => [:index]
  # layout 'split_map', :except=> [:show, :edit]
  layout :choose_layout

    def choose_layout
      if action_name == 'index'
        return 'split_map'
      else
        return 'application'
      end
    end

  def index
    index! do
      logger.debug(request.env['QUERY_STRING'])
    end
    
  end
  
   #export the results of search/browse to a csv file
  def export
    headers = JSON[params[:column_array]]
    rows = JSON[params[:row_array]]<commit_msg>Removed some unneeded code<commit_after>require 'responders/rql'

class ProjectsController < InheritedResources::Base
  responders :rql
  
  respond_to :html, :json

  layout :choose_layout

  def choose_layout
    if action_name == 'index'
      return 'split_map'
    else
      return 'application'
    end
  end

  def index
    index! do
      logger.debug(request.env['QUERY_STRING'])
    end
    
  end
  
   #export the results of search/browse to a csv file
  def export
    headers = JSON[params[:column_array]]
    rows = JSON[params[:row_array]]
{'fraction_non_alphanumeric': 0.09263854425144748, 'fraction_numerical': 0.0, 'mean_word_length': 3.0468227424749164, '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': '1198041', 'n_tokens_mistral': 393, 'n_tokens_neox': 378, 'n_words': 103}