Ruby on Rails Tuesday, November 30, 2010

On 30 November 2010 14:10, PalaniKannan K <kpalanikannan@gmail.com> wrote:
> I need the results have to print without duplicates. This gives the results
> with duplicates.
<snip>
> and
<snip>
> presents same results with duplicates. Please about your suggestion.

I'm having trouble seeing where you're even trying to explain what you
have, and what you want....

Does this give what you're after? :
<%= @sp_references.map(&:all_references).flatten.map(&:reference).uniq.delete_if{|ref|
ref=~ /emend$/i}.join("<br/>") %>

To be honest, I'm just stabbing in the dark, because you've not
explained anything about what these objects are made of or what actual
end result you want to achieve... some pseudo-code would help...

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment