Trimming a collection of AR objects?

Taylor Strait wrote:

I have a collection of acts_as_ferret search results that I need to trim
based on an attribute. I've been trying to iterate through the
collection but haven't been able to make this work. Here is what I have
tried unsuccessfully:

@people.each {|person| person.clear if person.privacy_type == "private"}

Unfortunately Class Person does not respond to clear since it is an AR
object not a hash. Even if it were an hash, I feel like I need to
perform the operation on the COLLECTION of hashes @people anyways.

However, checking @people with <%= @person.class %> tells returns an
unhelpful 'NilClass.' How can I iterate through @people and delete all
the ones with privacy_type == "private?"

Something like:

@people.find_all {|person| person.privacy_type != "private"}

See:
http://corelib.rubyonrails.org/classes/Enumerable.html#M002177