Tiny equivalent suggestion but do you think using sample might be slightly nicer than shuffle+first ?
    (endpoints - [@current_endpoint]).sample