Open AmitJoki opened 6 years ago
Add a link for Mac which calls the decline_request method for foo
@AmitJoki I'm not opposed if you want to submit a PR, but I tend to agree with @ganeshh123.
Currently doing this right now
This is my method:
def cancel_request @user = current_user @newfriend @newfriend = User.find(params[:id]) @newfriend.decline_request(current_user) redirect_to @newfriend, flash: {notice: "Your friend request to " + @newfriend.name + " has been cancelled"} end
The link would be something like "/users/:id/cancel request"
Bit Late to answer, but hope this helps anyone else needing this feature
Facebook allows to roll back the "Add Friend" request. I am looking for such a method in has_friendship
Like:
As of now, I have the following in my
user.rb
I think this will be an useful method to be incorporated into the gem.