Home > mongo_mapper_multi_modifiers

mongo_mapper_multi_modifiers

Mongo_mapper_multi_modifiers is a project mainly written in Ruby, it's free.

A MongoMapper plugin that allows multiple modifications to a document in a single update.

h1. MongoMapper Multi-Modifiers

This is a plugin for MongoMapper that allows updates to multiple fields in a single document within a single update call.

h2. Example


Foo.modify(:title => "My Favorite Colors") do
  push(:colors => ["red", "blue"])
  increment(:num_colors => 2)
end

h2. TODO

  • Gem spec
  • Look at how BulkModifier evaluates its block and see if there's a cleaner way.