class Friendship < AR::Base
to an array so that uniq! can be called on it?
it seems like a neat trick and i’d really like to learn it if its real.
You don’t show the definition of the User class, it’s possible that
user_ids is a composite attribute, which would be done using the
composed_of :user_ids, … declaration.
You don’t show the definition of the User class, it’s possible that
user_ids is a composite attribute, which would be done using the
composed_of :user_ids, … declaration.
Having just said that it’s probably not the case. More likely
user_ids is converted in before_save and after_initialize and/or
after_find callbacks.