Module: MongoMapper::Plugins::Userstamps::ClassMethods
- Defined in:
- lib/mongo_mapper/plugins/userstamps.rb
Instance Method Summary collapse
Instance Method Details
#userstamps!(options = {}) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/mongo_mapper/plugins/userstamps.rb', line 8 def userstamps!( = {}) class_name = ([:class_name] || [:class] || 'User' ).to_s key :creator_id, ObjectId key :updater_id, ObjectId belongs_to :creator, :class_name => class_name belongs_to :updater, :class_name => class_name end |