app/controllers/friendships_controller.rb
def reject
    friend_id = friendship_params[:friend_id]
    @friendship = Friendship.find_by(
      veteran_id: friend_id,
      friend_id: params[:veteran_id]
    )
    if @friendship.destroy
      render json: @friendship
    else
      render json: @friendship.errors, status: :unprocessable_entity
    end
  end
# PATCH /veterans/1/friendships/reject
# Rejects a friend request sent to this veteran by
# removing the corresponding friendship with params
# veteran_id: <friend's id>, friend_id: <this veteran's id>
PATCH /veterans/1/friendships/reject
Rejects a friend request sent to this veteran by
removing the corresponding friendship with params
veteran_id: , friend_id: 
PATCH / veterans / 1 / friendships / reject Rejects a friend request sent to this veteran by removing the corresponding friendship with params veteran_id : friend_id :
def reject
    friend_id = friendship_params[:friend_id]
    @friendship = Friendship.find_by(
      veteran_id: friend_id,
      friend_id: params[:veteran_id]
    )
    if @friendship.destroy
      render json: @friendship
    else
      render json: @friendship.errors, status: :unprocessable_entity
    end
  end
def reject friend_id = friendship_params [ :friend_id ] @friendship = Friendship . find_by ( veteran_id : friend_id , friend_id : params [ :veteran_id ] ) if @friendship . destroy render json : @friendship else render json : @friendship . errors , status : :unprocessable_entity end end
PATCH /veterans/1/friendships/reject
Rejects a friend request sent to this veteran by
removing the corresponding friendship with params
veteran_id: <friend's id>, friend_id: <this veteran's id>
PATCH / veterans / 1 / friendships / reject Rejects a friend request sent to this veteran by removing the corresponding friendship with params veteran_id : <friend ' s id > friend_id : <this veteran ' s id >