<commit_before>class GaragesController < ApplicationController
  before_action :set_garage, only: [:show, :edit, :update, :destroy, :toggle_status, :destroy_logo]
  after_action :verify_authorized

  # GET /garages
  # GET /garages.json
  def index
    @garages = policy_scope(Garage.all).page(params[:page])
    authorize @garages
  end

  # GET /garages/1
  # GET /garages/1.json
  def show
    authorize @garage
    @fees = @garage.fees.all
  end

  # GET /garages/new
  def new
    @garage = Garage.new
    authorize @garage
  end

  # GET /garages/1/edit
  def edit<commit_msg>a country manager can create garages only for his country<commit_after>class GaragesController < ApplicationController
  before_action :set_garage, only: [:show, :edit, :update, :destroy, :toggle_status, :destroy_logo]
  after_action :verify_authorized

  # GET /garages
  # GET /garages.json
  def index
    @garages = policy_scope(Garage.all).page(params[:page])
    authorize @garages
  end

  # GET /garages/1
  # GET /garages/1.json
  def show
    authorize @garage
    @fees = @garage.fees.all
  end

  # GET /garages/new
  def new
    country = nil
    country = current_user.country if current_user.country_manager?
    @garage = Garage.new(country: country)
    authorize @garage
  end

  # GET /garages/1/edit
  def edit
{'fraction_non_alphanumeric': 0.10060975609756098, 'fraction_numerical': 0.004573170731707317, 'mean_word_length': 3.420875420875421, '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': '3936614', 'n_tokens_mistral': 463, 'n_tokens_neox': 452, 'n_words': 113}