I have 2 arrays:
@array1 = [a,b,c,d,e]
@array2 = [d,e,f,g,h]
I want to compare the two arrays to find matches (d,e) and count the number of matches found (2)?
<% if @array2.include?(@array1) %>
# yes, but how to count instances?
<% else %>
no matches found...
<% end %>
Thanks in advance~