adding the user to the correct group
This commit is contained in:
parent
6a3eb97fd4
commit
97e5468cea
1 changed files with 1 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ class RequestsController < ApplicationController
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
if params[:accept]
|
if params[:accept]
|
||||||
@friend = current_user.accept_and_respond( params[:id], current_user.groups.first.id)
|
@friend = current_user.accept_and_respond( params[:id], current_user.group_by_id(params[:group_id]))
|
||||||
|
|
||||||
flash[:notice] = "you are now friends"
|
flash[:notice] = "you are now friends"
|
||||||
redirect_to root_url
|
redirect_to root_url
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue