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
Post a Comment