So I have an array built by collect.
@a = Relation.where(part: "v04")
@relations = @a.collect {|x| x.car}
Builds..
=> [“f03”, “f04”]
@a = Relation.where(part: "v03")
@relations = @a.collect {|x| x.car}
Builds..
=> [“f01”, “f03”]
What I want is to append the collect so that I can build an array from both v03 and v04 so that it looks like this.
=> [“f03”, “f04”, “f01”, “f03”]
And then only keeps unique values so that it looks like this.
=> [“f03”, “f04”, “f01”]
Take out f03 since it was listed twice.
1 Answer