SyntaxFix
Write A Post
Hire A Developer
Questions
Just another alternative if anyone cares.
You can also use the to_set method of an array which converts the Array into a Set and by definition, set elements are unique.
to_set
[1,2,3,4,5,5,5,6].to_set => [1,2,3,4,5,6]