Sha256: 14f60e98733e47eaf74cdd69d746cb7844f6a491c371d5405f046a023e1a2265
Contents?: true
Size: 304 Bytes
Versions: 1
Compression:
Stored size: 304 Bytes
Contents
module MongoMapper module Plugins module Clone extend ActiveSupport::Concern module InstanceMethods def clone clone_attributes = self.attributes clone_attributes.delete("_id") self.class.new(clone_attributes) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mongo_mapper-rails3-0.7.0.1 | lib/mongo_mapper/plugins/clone.rb |