Dear Michael,

Thanks lot for your answer.

<% @sp_references.each do |sp_ref| %>
>   <%= sp_ref.all_references.map(&:reference).uniq.delete_if{|ref| ref
> =~ /emend$/i}.join("<br/>") %>
> <% end %>
>

I need the results have to print without duplicates. This gives the results
with duplicates.

* <% @sp_references.each do |sp_ref| %>
*
*  <%= sp_ref.all_references.map(&:reference).delete_if{|ref| ref=~
/emend$/i}.join("<br/>") %>
<% end %>*

and

* <% @sp_references.each do |sp_ref| %>
*
*  <%= sp_ref.all_references.map(&:reference).uniq.delete_if{|ref| ref=~
/emend$/i}.join("<br/>") %>
<% end %>*

presents same results with duplicates. Please about your suggestion.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to