<commit_before>class Admin::Ticketing::CaseUpdatesController < ApplicationController
  
  def create
    @case_update = CaseUpdate.new(case_update_params)
    @case_update.received_at = DateTime.now
    
    if @case_update.save
      @case_update.case.update_attribute(:status, @case_update.new_state) unless @case_update.new_state.blank?
      @case_update.case.update_attribute(:priority, @case_update.new_priority) unless @case_update.new_priority.blank?
      
      unless @case_update.new_assignee.nil?
        @case_update.case.update_attribute(:assigned_to, @case_update.new_assignee)
        CaseMailer.assigned(@case_update.case)
      end
      
      unless @case_update.response.blank?
        begin
          CaseMailer.response(@case_update).deliver
        rescue => e
          flash[:error] = "Error sending email: " + e.message
        end
      end
      <commit_msg>mailer fix<commit_after>class Admin::Ticketing::CaseUpdatesController < ApplicationController
  
  def create
    @case_update = CaseUpdate.new(case_update_params)
    @case_update.received_at = DateTime.now
    
    if @case_update.save
      @case_update.case.update_attribute(:status, @case_update.new_state) unless @case_update.new_state.blank?
      @case_update.case.update_attribute(:priority, @case_update.new_priority) unless @case_update.new_priority.blank?
      
      unless @case_update.new_assignee.nil?
        @case_update.case.update_attribute(:assigned_to, @case_update.new_assignee)
        CaseMailer.assigned(@case_update.case).deliver
      end
      
      unless @case_update.response.blank?
        begin
          CaseMailer.response(@case_update).deliver
        rescue => e
          flash[:error] = "Error sending email: " + e.message
        end
      end
      
{'fraction_non_alphanumeric': 0.09376754632229085, 'fraction_numerical': 0.0, 'mean_word_length': 3.2327790973871733, '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': '3432943', 'n_tokens_mistral': 543, 'n_tokens_neox': 538, 'n_words': 77}