Module: MarkMapper::Plugins::Userstamps::ClassMethods

Defined in:
lib/mark_mapper/plugins/userstamps.rb

Instance Method Summary collapse

Instance Method Details

#userstamps!(options = {}) ⇒ Object


8
9
10
11
12
13
14
# File 'lib/mark_mapper/plugins/userstamps.rb', line 8

def userstamps!(options = {})
  class_name = (options[:class_name] || options[: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