<commit_before>class RequestsController < ApplicationController
  before_filter :authenticate_user!
  include RequestsHelper 
  def index
    @remote_requests = Request.for_user( current_user )
    @request = Request.new
  end
  
  def destroy
    if params[:accept]

      if params[:group_id]
        @friend = current_user.accept_and_respond( params[:id], params[:group_id])
        
        flash[:notice] = "you are now friends"
        redirect_to root_url 
      else
        flash[:error] = "please select a group!"
        redirect_to requests_url<commit_msg>Redirect to the group you put someone in after adding them as friends<commit_after>class RequestsController < ApplicationController
  before_filter :authenticate_user!
  include RequestsHelper 
  def index
    @remote_requests = Request.for_user( current_user )
    @request = Request.new
  end
  
  def destroy
    if params[:accept]

      if params[:group_id]
        @friend = current_user.accept_and_respond( params[:id], params[:group_id])
        
        flash[:notice] = "you are now friends"
        redirect_to current_user.group_by_id(params[:group_id])
      else
        flash[:error] = "please select a group!"
        redirect_to requests_url
{'fraction_non_alphanumeric': 0.07830342577487764, 'fraction_numerical': 0.0, 'mean_word_length': 3.245674740484429, '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': '5985975', 'n_tokens_mistral': 351, 'n_tokens_neox': 341, 'n_words': 91}