I am attempting to create a friend network on a site I am making. I am using Mongoid. How do I instantiate friends?
I assume that Users needs to have a relational association with multiple other users. But the following code:
class User
include Mongoid::Document
references_many :users, :stored_as=>:array, :inverse_of=> :users
end
tells me that I have an invalid query. What am I doing wrong? Does anybody have any suggestions on how to get what I am looking for?