Skip to content

Instantly share code, notes, and snippets.

@phorsfall
Created February 10, 2011 21:36
Show Gist options
  • Save phorsfall/821394 to your computer and use it in GitHub Desktop.
Save phorsfall/821394 to your computer and use it in GitHub Desktop.
Hmmph, Mongoid
e = Event.new
=> #<Event _id: 4d545395223e17aeca000004>
"ZOMG!!!" if e.creator
=> nil
e.creator.object_id
=> 4
e.creator = nil
=> nil
"ZOMG!!!" if e.creator
=> "ZOMG!!!"
e.creator.object_id
=> 2158412140
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment