<commit_before>class MessagesController < ApplicationController
  def index
    @conversations = current_user.mailbox.conversations
    @notifications = current_user.mailbox.notifications.group_by &:sender_id
    @receipts = current_user.mailbox.receipts
    @message = current_user.mailbox.inbox.first.messages.first.body

  end

# GET /message/new
  def new
  @user = User.find(params[:user])  #user the person wishes to contact
  @item = Item.find(params[:item])  #itme the person wishes to inquire about
  @message = current_user.messages.new
    # display form
  end

  # POST /message/create
  def create
    @recipient = User.find(params[:user])
    current_user.send_message(@recipient, params[:body], params[:subject])
    flash[:notice] = "Message has been sent!"
    redirect_to :conversations
  end
end<commit_msg>change redirect to root path for testing message"<commit_after>class MessagesController < ApplicationController
  def index
    @conversations = current_user.mailbox.conversations
    @notifications = current_user.mailbox.notifications.group_by &:sender_id
    @receipts = current_user.mailbox.receipts
    @message = current_user.mailbox.inbox.first.messages.first.body

  end

# GET /message/new
  def new
  @user = User.find(params[:user])  #user the person wishes to contact
  @item = Item.find(params[:item])  #itme the person wishes to inquire about
  @message = current_user.messages.new
    # display form
  end

  # POST /message/create
  def create
    @recipient = User.find(params[:user])
    current_user.send_message(@recipient, params[:body], params[:subject])
    flash[:notice] = "Message has been sent!"
    redirect_to root_path
  end
end
{'fraction_non_alphanumeric': 0.09982174688057041, 'fraction_numerical': 0.0, 'mean_word_length': 4.29559748427673, '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': '3731999', 'n_tokens_mistral': 528, 'n_tokens_neox': 511, 'n_words': 124}