Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (17 sloc) 0.483 kB
# encoding: UTF-8
module MongoMapper
module Plugins
module Userstamps
extend ActiveSupport::Concern
module ClassMethods
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
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.