I have an array:
art_groups_arr = []
I’m getting it from:
art_groups_arr << a.art_name (in loop)
When I try to check for inclusion, I get can't convert Array into String
I tried:
n2.art_group.include?(art_groups_arr.map { |e| e})
In my view my array looks like:
["Амортизатор", "Защитный колпак / пыльник, амортизатор"]
How can I correctly loop and check include??
If you want to check every element of one array to see if it’s in another array:
If you want to see if the arrays contain the exact same elements you can do this: