Derick Bailey
unread,May 6, 2011, 4:51:25 PM5/6/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Mongoid
Hi,
in previous released (2.0.beta.20), I could pass a class type as the
2nd parameter of the .find_or_create_by block on embedded documents.
this doesn't appear to be the case any more, with v2.0.1, yet I still
need to do polymorphic find_or_create_by. any suggestions / pointers
on how to do this?
I used to do this:
SomeClass.childclass.find_or_create_by({:key => "value"},
InheritingChildClass)
now I get an exception saying too many arguments (2 for 1)
on .find_or_create_by
any help is appreciated.
thanks.
-derick