Forums » Ruby on Rails » Ruby Set union
Join two arrays and remove all the duplicates with the pipe operator (|).

[ "a", "b", "c" ] | [ "c", "d", "a" ] # => ["a", "b", "c", "d"]