Skip to content

Instantly share code, notes, and snippets.

@lipchyk
Created November 8, 2010 10:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lipchyk/667549 to your computer and use it in GitHub Desktop.
Save lipchyk/667549 to your computer and use it in GitHub Desktop.
Using timestamps in MongoMapper Embedded document
class Foo
include MongoMapper::EmbeddedDocument
plugin MongoMapper::Plugins::Timestamps
belongs_to :bar
key :bar_id, ObjectId
#...
timestamps! #voila!
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment