def block(user)
      if inverse_friend_ids.include?(user.id)
        inverse_friend_ids.delete(user.id)
        user.friend_ids.delete(self.id)
        blocked_inverse_friend_ids << user.id
      elsif pending_inverse_friend_ids.include?(user.id)
        pending_inverse_friend_ids.delete(user.id)
        user.pending_friend_ids.delete(self.id)
        blocked_pending_inverse_friend_ids << user.id
      elsif friend_ids.include?(user.id)
        friend_ids.delete(user.id)
        user.inverse_friend_ids.delete(user.id)
        blocked_friend_ids << user.id
      else
        return false
      end

      self.save
    end
def block(user)
      if inverse_friend_ids.include?(user.id)
        inverse_friend_ids.delete(user.id)
        user.friend_ids.delete(self.id)
        blocked_inverse_friend_ids << user.id
      elsif pending_inverse_friend_ids.include?(user.id)
        pending_inverse_friend_ids.delete(user.id)
        user.pending_friend_ids.delete(self.id)
        blocked_pending_inverse_friend_ids << user.id
      elsif friend_ids.include?(user.id)
        friend_ids.delete(user.id)
        user.inverse_friend_ids.delete(user.id)
        blocked_friend_ids << user.id
      else
        return false
      end

      self.save
    end
blocks a friendship