Displaying 1 result from an estimated 1 matches for "privacy_typ".
Did you mean:
privacy_type
2006 Dec 17
3
Trimming a collection of AR objects?
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 ret...