getting rid of ants in flower beds
I have heard that cucumber slices are a deterrent. How about planting cucumbers?
In my research I did not see where cucumber plants repelled ants. It was always suggested to use cucumber slices or cucumber peels. I think the reason is that by slicing and peeling the cucumbers you release more of the juices and the pungency that deters the ants.
Here are some additional resources on eradicating ants: