Redirect to the group you put someone in after adding them as friends

This commit is contained in:
Raphael 2010-08-18 14:57:53 -07:00
parent 9f74cca191
commit a52077b176

View file

@ -13,7 +13,7 @@ class RequestsController < ApplicationController
@friend = current_user.accept_and_respond( params[:id], params[:group_id]) @friend = current_user.accept_and_respond( params[:id], params[:group_id])
flash[:notice] = "you are now friends" flash[:notice] = "you are now friends"
redirect_to root_url redirect_to current_user.group_by_id(params[:group_id])
else else
flash[:error] = "please select a group!" flash[:error] = "please select a group!"
redirect_to requests_url redirect_to requests_url