<commit_before>class ClientsController < ApplicationController
  load_and_authorize_resource except: [:index, :new]

  respond_to :html, :json

  def index
    @clients = current_user.clients.order("created_at DESC")
    respond_with @clients
  end

  def new
    @client = Client.new
    set_current_user @client
    @client.hourly_rate = "0"
    @client.currency
  end

  def edit
  end

  def create
    @client.user = current_user
    if @client.save
      redirect_to clients_path,
        notice: "Client was successfully created.
          <ul>
            <li><a href='#{new_worklog_path(client: @client)}'>Create the first worklog for #{@client.name}.</a></li>
            <li><a href='#{new_invoice_path(client: @client)}'>Or, create an invoice.</a></li><commit_msg>remove authorize exception<commit_after>class ClientsController < ApplicationController
  load_and_authorize_resource

  respond_to :html, :json

  def index
    respond_with @clients.order("created_at DESC")
  end

  def new
    @client = Client.new
    set_current_user @client
    @client.hourly_rate = "0"
    @client.currency
  end

  def edit
  end

  def create
    @client.user = current_user
    if @client.save
      redirect_to clients_path,
        notice: "Client was successfully created.
          <ul>
            <li><a href='#{new_worklog_path(client: @client)}'>Create the first worklog for #{@client.name}.</a></li>
            <li><a href='#{new_invoice_path(client: @client)}'>Or, create an invoice.</a></li>
{'fraction_non_alphanumeric': 0.11620185922974767, 'fraction_numerical': 0.0013280212483399733, 'mean_word_length': 3.2570621468926553, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 21, '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': '3815274', 'n_tokens_mistral': 486, 'n_tokens_neox': 476, 'n_words': 114}