markbates/mongoid_delorean — pull request #2 by GUI (2013-11-08 04:08:08+00:00)
Title: Fix embeds_one functionality

This fixes `embeds_one` relationships. They previously caused Mongoid Deloreon to throw errors. @felipero / @crafters actually did the fix, I just found the fork and the fixes worked for me, so it might be nice to get this fixed upstream if possible. I added tests around this functionality, and also tweaked one little thing with @felipero's original code (so an empty embeds_one associations remains nil, rather than becoming an empty array).