Sha256: 7e5a355ea6e2b6a2ce56a17732d976f0524885ff5afb66931a60e8217aa1d5f5
Contents?: true
Size: 483 Bytes
Versions: 23
Compression:
Stored size: 483 Bytes
Contents
# 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
Version data entries
23 entries across 23 versions & 3 rubygems