Sadece iki model kullan, böyle bir şey:
class User
include Mongoid::Document
has_many :friendships
end
class Friendship
include Mongoid::Document
belongs_to :owner, :class_name => "User"
belongs_to :friend, :class_name => "User"
field :pending, :type => Boolean, :default => true
end
Kulağa hoş geliyor mu? Bu yardımcı olur umarım!