what options could be used in has_many ?

331 views
Skip to first unread message

RainChen

unread,
Apr 10, 2012, 5:21:53 AM4/10/12
to mon...@googlegroups.com

PS: I also commented on rubydoc: http://www.rubydoc.info/github/mongoid/mongoid/master/Mongoid/Relations/Macros/ClassMethods:has_many
rubydoc is a good tools for reading api documents

Durran Jordan

unread,
Apr 10, 2012, 6:47:31 AM4/10/12
to mon...@googlegroups.com
:as, :autosave, :dependent, :foreign_key, :order
https://github.com/mongoid/mongoid/blob/master/lib/mongoid/relations/referenced/many.rb#L684

You can also try any option you want, if you entered a bad one, Mongoid would raise an error and give you a list of what is valid.

2012/4/10 RainChen <hirai...@gmail.com>
Reply all
Reply to author
Forward
0 new messages