<commit_before>class AttachmentsController < ApplicationController
  before_filter :authenticate   
   
  def create
    @user = current_user
    @message = current_user.create_attached_message(params[:attachment])#.attachments.build(params[:attachment]
    #@attachment = @message.attachment
    if @message and @message.attachment
      #@message = @user.messages.create(content: @attachment.payload_identifier)
      #@message.attach(@attachment)
      @message.generate_outgoing_receipt
      @message.generate_incoming_receipts(attachment: @message.attachment)
      Pusher.push_message(@message)
    end
  end  
end<commit_msg>clean up attachments controller create action<commit_after>class AttachmentsController < ApplicationController
  before_filter :authenticate   
   
  def create
    @message = current_user.create_attached_message(params[:attachment])
    if @message and @message.attachment
      @message.generate_outgoing_receipt
      @message.generate_incoming_receipts(attachment: @message.attachment)
      Pusher.push_message(@message)
    end
  end  
end
{'fraction_non_alphanumeric': 0.08256029684601113, 'fraction_numerical': 0.0, 'mean_word_length': 4.73936170212766, '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': '4320037', 'n_tokens_mistral': 302, 'n_tokens_neox': 295, 'n_words': 52}