ruby on rails - How to implement mongoid many-to-many associations? -


i want port social network mongoid. join table between friends large. there way mongoid handle join table out of box? i've seen couple of in-model roll-your-own solutions it, nothing looks efficient. there way handle this? or case shouldn't using mongoid?

this method deprecated. can use references_and_referenced_in_many so:

class person   include mongoid::document   field :name   references_and referenced_in_many :preferences end  class preference   include mongoid::document   field :name   references_and referenced_in_many :people end 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -