Created
November 8, 2010 10:15
-
-
Save lipchyk/667549 to your computer and use it in GitHub Desktop.
Using timestamps in MongoMapper Embedded document
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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