<commit_before>class HomeController < ApplicationController

  def index
    if current_user.is_cesia?
      redirect_to organizations_path
    else
      redirect_to organization_path(@current_organization)
    end
  end

  def search
    if params[:search_string].size > 1 
      s = "%" + params[:search_string] + "%"
      @vendors = Vendor.where('vendors.name LIKE ?', s)
      @printer_models = PrinterModel.where('printer_models.name LIKE ?', s) + PrinterModel.where(vendor: @vendors)
      @toner_models   = TonerModel.where('toner_models.name LIKE ?', s) + TonerModel.where(vendor: @vendors)
    else
      redirect_to root_path, alert: 'Raffinare la ricerca.'
    end
  end
  
end

<commit_msg>strip spaces<commit_after>class HomeController < ApplicationController

  def index
    if current_user.is_cesia?
      redirect_to organizations_path
    else
      redirect_to organization_path(@current_organization)
    end
  end

  def search
    if params[:search_string].size > 1 
      s = "%" + params[:search_string].strip + "%"
      @vendors = Vendor.where('vendors.name LIKE ?', s)
      @printer_models = PrinterModel.where('printer_models.name LIKE ?', s) + PrinterModel.where(vendor: @vendors)
      @toner_models   = TonerModel.where('toner_models.name LIKE ?', s) + TonerModel.where(vendor: @vendors)
    else
      redirect_to root_path, alert: 'Raffinare la ricerca.'
    end
  end
  
end


{'fraction_non_alphanumeric': 0.1040339702760085, 'fraction_numerical': 0.0014154281670205238, 'mean_word_length': 3.488888888888889, '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': '6593285', 'n_tokens_mistral': 477, 'n_tokens_neox': 455, 'n_words': 95}