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

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

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

unit testing - How to mock PreferenceManager in Android? -