Sha256: 0d7b444b61bbbc0a9d8081d2f9aadb0791a594b1d5df3f66ffb171e164e5faaa
Contents?: true
Size: 394 Bytes
Versions: 16
Compression:
Stored size: 394 Bytes
Contents
module MongoMapperExt module Update def safe_update(white_list, values) white_list.each do |key| send("#{key}=", values[key]) if values.has_key?(key) end end end end MongoMapper::EmbeddedDocument.send(:include, MongoMapperExt::Update) if !MongoMapper::Document.kind_of?(MongoMapperExt::Update) MongoMapper::Document.send(:include, MongoMapperExt::Update) end
Version data entries
16 entries across 16 versions & 1 rubygems