title: find duplicates in each array rails
body: <hr>
  
  <p><strong>&lt;% @sp_references.each do |sp_ref| %><br>
   &lt;% sp_ref.all_references.each_with_index do |tax_ref, i| %>
    &lt;%if (tax_ref.reference.uniq) &amp;&amp; (tax_ref.reference !~ /emend$/i) %>
     &lt;%= tax_ref.reference %>
    &lt;%end%>
   &lt;%end%>
  &lt;%end%></strong></p>
  
  <hr>
  
  <p>This 'uniq' option to get distinct elements in tax_ref.reference is not working. It shows "undefined method `uniq' for #